Update gradio_app.py
Browse files- gradio_app.py +4 -9
gradio_app.py
CHANGED
|
@@ -19,15 +19,10 @@ DESCRIPTION = '''
|
|
| 19 |
</div>
|
| 20 |
'''
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
|
| 25 |
-
#
|
| 26 |
-
with open("gradio_app/static/style.css", "r") as file:
|
| 27 |
-
CSS = file.read()
|
| 28 |
-
file.close()
|
| 29 |
-
|
| 30 |
-
JS_PATH = "gradio_app/static/script.js"
|
| 31 |
|
| 32 |
def user(message, history):
|
| 33 |
if not isinstance(history, list):
|
|
@@ -37,7 +32,7 @@ def user(message, history):
|
|
| 37 |
def create_ui(model_handler):
|
| 38 |
with gr.Blocks(css=CSS, theme=gr.themes.Default()) as demo:
|
| 39 |
gr.Markdown(DESCRIPTION)
|
| 40 |
-
gr.HTML(
|
| 41 |
active_gen = gr.State([False])
|
| 42 |
model_handler_state = gr.State(model_handler)
|
| 43 |
|
|
|
|
| 19 |
</div>
|
| 20 |
'''
|
| 21 |
|
| 22 |
+
# Replace external CSS fetch with local file
|
| 23 |
+
CSS = open("gradio_app/static/styles.css").read()
|
| 24 |
|
| 25 |
+
# JS_PATH = "gradio_app/static/script.js"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
def user(message, history):
|
| 28 |
if not isinstance(history, list):
|
|
|
|
| 32 |
def create_ui(model_handler):
|
| 33 |
with gr.Blocks(css=CSS, theme=gr.themes.Default()) as demo:
|
| 34 |
gr.Markdown(DESCRIPTION)
|
| 35 |
+
gr.HTML('<script src="file=gradio_app/static/script.js"></script>')
|
| 36 |
active_gen = gr.State([False])
|
| 37 |
model_handler_state = gr.State(model_handler)
|
| 38 |
|