Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,16 +102,22 @@ def get_and_visualize_data(query):
|
|
| 102 |
# 4. Создаем Gradio интерфейс
|
| 103 |
with gr.Blocks(css=styles) as demo:
|
| 104 |
with gr.Row():
|
| 105 |
-
|
| 106 |
-
submit_btn = gr.Button("Go", variant="primary")
|
| 107 |
|
| 108 |
poster_display = gr.HTML()
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
|
| 116 |
demo.load(None, None, None, js=scripts)
|
| 117 |
|
|
|
|
| 102 |
# 4. Создаем Gradio интерфейс
|
| 103 |
with gr.Blocks(css=styles) as demo:
|
| 104 |
with gr.Row():
|
| 105 |
+
prompt_input = gr.Textbox(label="prompt", placeholder="Example: create a cheatsheet poster with npm commands")
|
| 106 |
+
#submit_btn = gr.Button("Go", variant="primary")
|
| 107 |
|
| 108 |
poster_display = gr.HTML()
|
| 109 |
+
|
| 110 |
+
prompt_input.submit(
|
| 111 |
+
get_and_visualize_data,
|
| 112 |
+
prompt_input,
|
| 113 |
+
poster_display,
|
| 114 |
)
|
| 115 |
+
|
| 116 |
+
#submit_btn.click(
|
| 117 |
+
# fn=get_and_visualize_data,
|
| 118 |
+
# inputs=prompt_input,
|
| 119 |
+
# outputs=poster_display
|
| 120 |
+
#)
|
| 121 |
|
| 122 |
demo.load(None, None, None, js=scripts)
|
| 123 |
|