w11wo commited on
Commit
694b9d1
·
1 Parent(s): 98172ce

Hide scenario on record

Browse files
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -93,13 +93,13 @@ def init_interface(
93
 
94
  You will be presented with a series of scenarios. For each scenario, please:
95
 
96
- 1. **Formulate a Query**: Imagine how you would ask Google Maps about the scenario using voice input. **Be as creative as you like!** Feel free to use different phrasings, expressions, or styles that you think are natural.
97
 
98
- 2. **Take a Screenshot**: Capture the Google Maps results page that shows the system's response.
99
 
100
- 3. **Record Your Audio**: Speak your query again and upload the recording.
101
 
102
- 4. **Evaluate the Result**: Tell us whether Google Maps gave a satisfactory response. If not, explain why.
103
 
104
  5. **Provide a Transcript**: Post-edit and submit a written version of what you said in your query.
105
 
@@ -439,6 +439,12 @@ if __name__ == "__main__":
439
  # transcribe audio after upload
440
  audio_input.input(fn=transcribe_audio, inputs=audio_input, outputs=transcript_input)
441
 
 
 
 
 
 
 
442
  with gr.Column():
443
  image_input = gr.Image(type="filepath", label="Image Upload (Google Maps Screenshot)", height=600)
444
  expected_output = gr.Textbox(label="What did you expect Google Maps to return?")
 
93
 
94
  You will be presented with a series of scenarios. For each scenario, please:
95
 
96
+ 1. **Formulate Your Query**: Read the scenario and imagine how you would ask Google Maps about it using voice input. <u>Be as creative as you like</u>! You can try different phrasings, expressions, or styles that feel natural.
97
 
98
+ 2. **Record Your Query**: Once you're ready, hit “record” and at the same time, speak your query to Google Maps. Once recording starts, the scenario will be hidden, so make sure your query is ready in your mind!
99
 
100
+ 3. **Take a Screenshot**: After recording, capture the Google Maps results page that shows the system's response and upload it.
101
 
102
+ 4. **Evaluate the Result**: Tell us whether Google Maps gave a satisfactory response. If not, please explain why.
103
 
104
  5. **Provide a Transcript**: Post-edit and submit a written version of what you said in your query.
105
 
 
439
  # transcribe audio after upload
440
  audio_input.input(fn=transcribe_audio, inputs=audio_input, outputs=transcript_input)
441
 
442
+ # hide scenario text when user starts recording
443
+ audio_input.start_recording(fn=lambda: gr.update(visible=False), outputs=scenario_input)
444
+
445
+ # show scenario text when user stops recording
446
+ audio_input.stop_recording(fn=lambda: gr.update(visible=True), outputs=scenario_input)
447
+
448
  with gr.Column():
449
  image_input = gr.Image(type="filepath", label="Image Upload (Google Maps Screenshot)", height=600)
450
  expected_output = gr.Textbox(label="What did you expect Google Maps to return?")