Spaces:
Sleeping
Sleeping
research14
commited on
Commit
•
0ce110a
1
Parent(s):
8d07073
testing user_input update textbox
Browse files
app.py
CHANGED
@@ -213,7 +213,7 @@ def interface():
|
|
213 |
task_btn = gr.Button(value="Submit")
|
214 |
|
215 |
# Outputs
|
216 |
-
user_prompt = gr.Textbox(
|
217 |
gr.Markdown("### Strategy 1 - QA-Based Prompting")
|
218 |
strategy1 = gr.Markdown("S1", visible=False)
|
219 |
with gr.Row():
|
@@ -241,11 +241,11 @@ def interface():
|
|
241 |
task_btn.click(update_api_key, inputs=task_apikey_input)
|
242 |
|
243 |
# Show user's original prompt
|
244 |
-
def update_textbox():
|
245 |
# Update the textbox text here
|
246 |
-
user_prompt.text =
|
247 |
|
248 |
-
task_btn.click(update_textbox)
|
249 |
|
250 |
# Event Handler for GPT 3.5 Chatbot POS/Chunk, user must submit api key before submitting the prompt
|
251 |
# Will activate after getting API key
|
|
|
213 |
task_btn = gr.Button(value="Submit")
|
214 |
|
215 |
# Outputs
|
216 |
+
user_prompt = gr.Textbox(" ", label="Original prompt")
|
217 |
gr.Markdown("### Strategy 1 - QA-Based Prompting")
|
218 |
strategy1 = gr.Markdown("S1", visible=False)
|
219 |
with gr.Row():
|
|
|
241 |
task_btn.click(update_api_key, inputs=task_apikey_input)
|
242 |
|
243 |
# Show user's original prompt
|
244 |
+
def update_textbox(prompt):
|
245 |
# Update the textbox text here
|
246 |
+
user_prompt.text = prompt
|
247 |
|
248 |
+
task_btn.click(update_textbox, inputs=task_prompt)
|
249 |
|
250 |
# Event Handler for GPT 3.5 Chatbot POS/Chunk, user must submit api key before submitting the prompt
|
251 |
# Will activate after getting API key
|