Update app.py
Browse files
app.py
CHANGED
@@ -43,27 +43,21 @@ async def read_index():
|
|
43 |
def read_root():
|
44 |
return {"message": "Willkommen am Root-Endpunkt."}
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
gr.IFrame(src="http://localhost:8000/fa.html", width="100%", height="600px")
|
55 |
-
with gr.Row():
|
56 |
-
details_output = gr.Textbox(label="Ausgabe")
|
57 |
-
with gr.Row():
|
58 |
-
ort_input = gr.Textbox(label="", placeholder="ask anything...")
|
59 |
-
with gr.Row():
|
60 |
-
button = gr.Button("Senden")
|
61 |
|
62 |
-
|
63 |
-
|
64 |
|
65 |
-
# Launch the Gradio application
|
66 |
-
demo.launch()
|
67 |
|
68 |
if __name__ == "__main__":
|
69 |
# Starte Gradio in einem separaten Thread
|
|
|
43 |
def read_root():
|
44 |
return {"message": "Willkommen am Root-Endpunkt."}
|
45 |
|
46 |
+
with gr.Blocks() as demo:
|
47 |
+
gr.IFrame(src="http://localhost:8000/fa.html", width="100%", height="600px")
|
48 |
+
with gr.Row():
|
49 |
+
details_output = gr.Textbox(label="Ausgabe")
|
50 |
+
with gr.Row():
|
51 |
+
ort_input = gr.Textbox(label="", placeholder="ask anything...")
|
52 |
+
with gr.Row():
|
53 |
+
button = gr.Button("Senden")
|
54 |
|
55 |
+
# Connect the button to the function
|
56 |
+
button.click(fn=get_prompt, inputs=ort_input, outputs=details_output)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
+
# Launch the Gradio application
|
59 |
+
demo.launch()
|
60 |
|
|
|
|
|
61 |
|
62 |
if __name__ == "__main__":
|
63 |
# Starte Gradio in einem separaten Thread
|