Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ secreturl = os.environ.get('secret_url')
|
|
9 |
custom_css = """
|
10 |
#md {
|
11 |
height: 350px;
|
12 |
-
font-size:
|
13 |
background: #121212;
|
14 |
padding: 20px;
|
15 |
padding-top: 40px;
|
@@ -19,6 +19,10 @@ custom_css = """
|
|
19 |
width: 200px;
|
20 |
float: right;
|
21 |
}
|
|
|
|
|
|
|
|
|
22 |
"""
|
23 |
|
24 |
def question(prompt, optimization_mode):
|
@@ -79,8 +83,11 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Default(font=[gr.themes.GoogleFon
|
|
79 |
links_output = gr.Markdown(label="Antwort", elem_id="md")
|
80 |
ort_input = gr.Textbox(label="Frage", placeholder="ask anything...", scale=3, value="")
|
81 |
optimization_mode_input = gr.Dropdown(choices=["speed", "balanced"], label="Optimization Mode", value="speed")
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
84 |
clear_button = gr.Button("clear", elem_id="clear")
|
85 |
clear_button.click(fn=clear, inputs=[], outputs=[ort_input, optimization_mode_input])
|
86 |
|
|
|
9 |
custom_css = """
|
10 |
#md {
|
11 |
height: 350px;
|
12 |
+
font-size: 24px;
|
13 |
background: #121212;
|
14 |
padding: 20px;
|
15 |
padding-top: 40px;
|
|
|
19 |
width: 200px;
|
20 |
float: right;
|
21 |
}
|
22 |
+
#clear {
|
23 |
+
width: 200px;
|
24 |
+
float: right;
|
25 |
+
}
|
26 |
"""
|
27 |
|
28 |
def question(prompt, optimization_mode):
|
|
|
83 |
links_output = gr.Markdown(label="Antwort", elem_id="md")
|
84 |
ort_input = gr.Textbox(label="Frage", placeholder="ask anything...", scale=3, value="")
|
85 |
optimization_mode_input = gr.Dropdown(choices=["speed", "balanced"], label="Optimization Mode", value="speed")
|
86 |
+
|
87 |
+
with gr.Row():
|
88 |
+
button = gr.Button("senden", elem_id="senden")
|
89 |
+
button.click(fn=question, inputs=[ort_input, optimization_mode_input], outputs=links_output)
|
90 |
+
|
91 |
clear_button = gr.Button("clear", elem_id="clear")
|
92 |
clear_button.click(fn=clear, inputs=[], outputs=[ort_input, optimization_mode_input])
|
93 |
|