reintroduce custom css support

This commit is contained in:
Ali Abid 2021-07-14 18:17:26 -07:00
parent 31919a884c
commit e49e88c244
3 changed files with 18 additions and 11 deletions

View File

@ -28,6 +28,12 @@ get_config().then(config => {
if (config.auth_required) {
ReactDOM.render(<Login {...config} />, document.getElementById('root'))
} else {
if (config.css !== null) {
var head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');
head.appendChild(style);
style.appendChild(document.createTextNode(config.css));
}
ReactDOM.render(
<div class="gradio_page">
{config.title ? <h1 className="title">{config.title}</h1> : false}

View File

@ -1,15 +1,15 @@
numpy
scipy
matplotlib
pandas
pillow
Flask-Cors>=3.0.8
Flask-Login
Flask>=1.1.1
analytics-python
ffmpy
flask-cachebuster
markdown2
matplotlib
numpy
pandas
paramiko
pillow
pycryptodome
requests
paramiko
analytics-python
Flask>=1.1.1
Flask-Cors>=3.0.8
flask-cachebuster
Flask-Login
scipy

View File

@ -239,6 +239,7 @@ class Interface:
"description": self.description,
"article": self.article,
"theme": self.theme,
"css": self.css,
"thumbnail": self.thumbnail,
"allow_screenshot": self.allow_screenshot,
"allow_flagging": self.allow_flagging,