Spaces:
Runtime error
Runtime error
Update gradio_app.py
Browse files- gradio_app.py +4 -3
gradio_app.py
CHANGED
|
@@ -18,16 +18,17 @@ DESCRIPTION = '''
|
|
| 18 |
<strong><span class="intro-icon">ℹ️</span> Notice:</strong> For research purposes only. AI responses may have limitations due to development, datasets, and architecture. <strong>Always consult a medical professional for health advice 🩺</strong>.
|
| 19 |
</div>
|
| 20 |
'''
|
| 21 |
-
|
|
|
|
| 22 |
def user(message, history):
|
| 23 |
if not isinstance(history, list):
|
| 24 |
history = []
|
| 25 |
return "", history + [[message, None]]
|
| 26 |
|
| 27 |
def create_ui(model_handler):
|
| 28 |
-
with gr.Blocks(css=
|
| 29 |
gr.Markdown(DESCRIPTION)
|
| 30 |
-
gr.HTML('<script src=
|
| 31 |
active_gen = gr.State([False])
|
| 32 |
model_handler_state = gr.State(model_handler)
|
| 33 |
|
|
|
|
| 18 |
<strong><span class="intro-icon">ℹ️</span> Notice:</strong> For research purposes only. AI responses may have limitations due to development, datasets, and architecture. <strong>Always consult a medical professional for health advice 🩺</strong>.
|
| 19 |
</div>
|
| 20 |
'''
|
| 21 |
+
CSS_PATH = "gardio_app/static/style.css"
|
| 22 |
+
JS_PATH = "gardio_app/static/script.js"
|
| 23 |
def user(message, history):
|
| 24 |
if not isinstance(history, list):
|
| 25 |
history = []
|
| 26 |
return "", history + [[message, None]]
|
| 27 |
|
| 28 |
def create_ui(model_handler):
|
| 29 |
+
with gr.Blocks(css=CSS_PATH, theme=gr.themes.Default()) as demo:
|
| 30 |
gr.Markdown(DESCRIPTION)
|
| 31 |
+
gr.HTML('<script src=JS_PATH></script>')
|
| 32 |
active_gen = gr.State([False])
|
| 33 |
model_handler_state = gr.State(model_handler)
|
| 34 |
|