Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -105,8 +105,6 @@ with gr.Blocks(title=f"{APP_Name} v{APP_Version}", css=CSS) as demo:
|
|
| 105 |
""")
|
| 106 |
state = gr.State(init_state())
|
| 107 |
|
| 108 |
-
gr.Markdown(f"# {APP_Name} \n<span style='opacity:.7'>v{APP_Version}</span>")
|
| 109 |
-
|
| 110 |
with gr.Row():
|
| 111 |
# Left: Chat
|
| 112 |
with gr.Column(scale=3):
|
|
@@ -124,16 +122,16 @@ with gr.Blocks(title=f"{APP_Name} v{APP_Version}", css=CSS) as demo:
|
|
| 124 |
label="Models",
|
| 125 |
info="Select Your Model Here",
|
| 126 |
)
|
| 127 |
-
gr.Image(LOGO_PATH, show_label=False, container=False)
|
| 128 |
-
info_md = gr.Markdown(MODEL_INFO.get(MODELS[0], ""))
|
| 129 |
-
|
| 130 |
def _update_info(m: str) -> str:
|
| 131 |
title = f"**{m}**"
|
| 132 |
desc = MODEL_INFO.get(m, "")
|
| 133 |
return f"{title}\n\n{desc}"
|
| 134 |
model_choice.change(_update_info, model_choice, info_md)
|
|
|
|
|
|
|
|
|
|
| 135 |
|
| 136 |
-
|
| 137 |
def on_submit(msg, chat_messages):
|
| 138 |
if not msg:
|
| 139 |
return "", (chat_messages or [])
|
|
|
|
| 105 |
""")
|
| 106 |
state = gr.State(init_state())
|
| 107 |
|
|
|
|
|
|
|
| 108 |
with gr.Row():
|
| 109 |
# Left: Chat
|
| 110 |
with gr.Column(scale=3):
|
|
|
|
| 122 |
label="Models",
|
| 123 |
info="Select Your Model Here",
|
| 124 |
)
|
|
|
|
|
|
|
|
|
|
| 125 |
def _update_info(m: str) -> str:
|
| 126 |
title = f"**{m}**"
|
| 127 |
desc = MODEL_INFO.get(m, "")
|
| 128 |
return f"{title}\n\n{desc}"
|
| 129 |
model_choice.change(_update_info, model_choice, info_md)
|
| 130 |
+
|
| 131 |
+
gr.Image(LOGO_PATH, show_label=False, container=False)
|
| 132 |
+
info_md = gr.Markdown(MODEL_INFO.get(MODELS[0], ""))
|
| 133 |
|
| 134 |
+
|
| 135 |
def on_submit(msg, chat_messages):
|
| 136 |
if not msg:
|
| 137 |
return "", (chat_messages or [])
|