Update app.py
Browse files
app.py
CHANGED
@@ -16,9 +16,10 @@ def generate_response(model_name, message, chat_history):
|
|
16 |
# Create Gradio UI
|
17 |
with gr.Blocks(
|
18 |
css=".contain { display: flex !important; flex-direction: column !important; }"
|
19 |
-
"#chatbot { flex-grow: 1 !important; overflow: auto !important;}"
|
20 |
"#col { height: calc(100vh - 112px - 16px) !important; }"
|
21 |
-
"#submit:hover { background-color: green !important;}
|
|
|
22 |
theme=gr.themes.Soft(font=[gr.themes.GoogleFont("Martel Sans")])
|
23 |
) as demo:
|
24 |
gr.Markdown("# GPT4All Chatbot")
|
@@ -45,7 +46,7 @@ with gr.Blocks(
|
|
45 |
submit_button = gr.Button("Submit", scale=1, elem_id="submit")
|
46 |
submit_button.click(generate_response, inputs=[model_dropdown, message, chatbot], outputs=[message, chatbot])
|
47 |
|
48 |
-
clear = gr.ClearButton([message, chatbot])
|
49 |
|
50 |
# Launch the Gradio app
|
51 |
demo.launch()
|
|
|
16 |
# Create Gradio UI
|
17 |
with gr.Blocks(
|
18 |
css=".contain { display: flex !important; flex-direction: column !important; }"
|
19 |
+
"#chatbot { flex-grow: 1 !important; overflow: auto !important; }"
|
20 |
"#col { height: calc(100vh - 112px - 16px) !important; }"
|
21 |
+
"#submit:hover { background-color: green !important; }"
|
22 |
+
"#clear:hover { background-color: red !important; }",
|
23 |
theme=gr.themes.Soft(font=[gr.themes.GoogleFont("Martel Sans")])
|
24 |
) as demo:
|
25 |
gr.Markdown("# GPT4All Chatbot")
|
|
|
46 |
submit_button = gr.Button("Submit", scale=1, elem_id="submit")
|
47 |
submit_button.click(generate_response, inputs=[model_dropdown, message, chatbot], outputs=[message, chatbot])
|
48 |
|
49 |
+
clear = gr.ClearButton([message, chatbot], elem_id="clear")
|
50 |
|
51 |
# Launch the Gradio app
|
52 |
demo.launch()
|