prozorov commited on
Commit
2936384
·
verified ·
1 Parent(s): d852cf1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -7
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
- city_input = gr.Textbox(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
- submit_btn.click(
111
- fn=get_and_visualize_data,
112
- inputs=city_input,
113
- outputs=poster_display
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