gerasdf commited on
Commit
497bc21
·
1 Parent(s): db9a221

with AI, large buttons (?), Send vs. Submit

Browse files
Files changed (1) hide show
  1. query.py +5 -6
query.py CHANGED
@@ -21,7 +21,7 @@ prompt_template = os.environ.get("PROMPT_TEMPLATE")
21
 
22
  prompt = ChatPromptTemplate.from_messages([('system', prompt_template)])
23
 
24
- AI = False
25
 
26
  def ai_setup():
27
  global llm, prompt_chain, oai_client
@@ -253,7 +253,7 @@ def gr_main():
253
  chatbot=chatbot,
254
  title="Sherlock Holmes stories",
255
  submit_btn=gr.Button(
256
- "Submit",
257
  variant="primary",
258
  scale=1,
259
  min_width=150,
@@ -290,14 +290,13 @@ def gr_main():
290
  visible=False,
291
  waveform_options=gr.WaveformOptions(sample_rate=16000, show_recording_waveform=False))
292
 
293
- start_stop_rec = gr.Button(TEXT_TALK)
294
- play_btn = gr.Button("Play last") #, enabled=False)
295
 
296
  play_btn.click(
297
  play_last,
298
  [chatbot, state], player)
299
-
300
-
301
  start_stop_rec.click(
302
  lambda x:x,
303
  inputs=start_stop_rec,
 
21
 
22
  prompt = ChatPromptTemplate.from_messages([('system', prompt_template)])
23
 
24
+ AI = True
25
 
26
  def ai_setup():
27
  global llm, prompt_chain, oai_client
 
253
  chatbot=chatbot,
254
  title="Sherlock Holmes stories",
255
  submit_btn=gr.Button(
256
+ "Send",
257
  variant="primary",
258
  scale=1,
259
  min_width=150,
 
290
  visible=False,
291
  waveform_options=gr.WaveformOptions(sample_rate=16000, show_recording_waveform=False))
292
 
293
+ start_stop_rec = gr.Button(TEXT_TALK, size = "lg")
294
+ play_btn = gr.Button("🔊 Play last", size = "lg", interactive=True)
295
 
296
  play_btn.click(
297
  play_last,
298
  [chatbot, state], player)
299
+
 
300
  start_stop_rec.click(
301
  lambda x:x,
302
  inputs=start_stop_rec,