research14 commited on
Commit
8d07073
1 Parent(s): f690e36

add user prompt

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -213,6 +213,7 @@ def interface():
213
  task_btn = gr.Button(value="Submit")
214
 
215
  # Outputs
 
216
  gr.Markdown("### Strategy 1 - QA-Based Prompting")
217
  strategy1 = gr.Markdown("S1", visible=False)
218
  with gr.Row():
@@ -239,6 +240,13 @@ def interface():
239
  # Event Handler for API Key
240
  task_btn.click(update_api_key, inputs=task_apikey_input)
241
 
 
 
 
 
 
 
 
242
  # Event Handler for GPT 3.5 Chatbot POS/Chunk, user must submit api key before submitting the prompt
243
  # Will activate after getting API key
244
  # task_apikey_btn.click(update_api_key, inputs=ling_ents_apikey_input)
 
213
  task_btn = gr.Button(value="Submit")
214
 
215
  # Outputs
216
+ user_prompt = gr.Textbox(label="Original prompt", placeholder=" ")
217
  gr.Markdown("### Strategy 1 - QA-Based Prompting")
218
  strategy1 = gr.Markdown("S1", visible=False)
219
  with gr.Row():
 
240
  # Event Handler for API Key
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 = task_prompt
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
252
  # task_apikey_btn.click(update_api_key, inputs=ling_ents_apikey_input)