emirhanbilgic commited on
Commit
545b263
·
verified ·
1 Parent(s): fde33bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -6
app.py CHANGED
@@ -127,14 +127,22 @@ with gr.Blocks() as demo:
127
 
128
  examples = [
129
  [
 
 
130
  "Once upon a time, in the depth of winter, when the flakes of snow fell like feathers from the clouds, a queen sat sewing at her palace window, which had a carved frame of black wood.",
131
- "In an inferior recording quality, a female speaker delivers her slightly expressive and animated words with a fast pace. There's a high level of background noise and a very distant-sounding reverberation. Her voice is slightly higher pitched than average.",
132
- None,
 
 
133
  ],
134
  [
135
- "The Importance of AI Safety.pdf",
136
- "Gary's voice is monotone yet slightly fast in delivery, with a very close recording that has no background noise.",
137
- None
 
 
 
 
138
  ]
139
  ]
140
 
@@ -143,7 +151,7 @@ with gr.Blocks() as demo:
143
  inputs=input_mode,
144
  outputs=[pdf_input, text_input],
145
  )
146
- gr.Examples(examples=examples, fn=run_pipeline, inputs=[input_mode, text_input, description], outputs=[audio_output, markdown_output], cache_examples=True)
147
  source_lang.change(update_target_lang, inputs=source_lang, outputs=target_lang)
148
 
149
  run_button.click(run_pipeline, inputs=[input_mode, pdf_input, text_input, translate_checkbox, source_lang, target_lang, description], outputs=[audio_output, markdown_output])
 
127
 
128
  examples = [
129
  [
130
+ "Type Text", # Example for text input mode
131
+ None, # No PDF
132
  "Once upon a time, in the depth of winter, when the flakes of snow fell like feathers from the clouds, a queen sat sewing at her palace window, which had a carved frame of black wood.",
133
+ False, # Translation not enabled
134
+ "en", # Source language
135
+ "tr", # Target language
136
+ "In an inferior recording quality, a female speaker delivers her slightly expressive and animated words with a fast pace. There's a high level of background noise and a very distant-sounding reverberation. Her voice is slightly higher pitched than average."
137
  ],
138
  [
139
+ "Upload PDF", # Example for PDF input mode
140
+ "The Importance of AI Safety.pdf", # PDF name
141
+ None, # No direct text input
142
+ False, # Translation not enabled
143
+ "en", # Source language
144
+ "tr", # Target language
145
+ "Gary's voice is monotone yet slightly fast in delivery, with a very close recording that has no background noise."
146
  ]
147
  ]
148
 
 
151
  inputs=input_mode,
152
  outputs=[pdf_input, text_input],
153
  )
154
+ gr.Examples(examples=examples, fn=run_pipeline, inputs=[input_mode, pdf_input, text_input, translate_checkbox, source_lang, target_lang, description], outputs=[audio_output, markdown_output], cache_examples=True)
155
  source_lang.change(update_target_lang, inputs=source_lang, outputs=target_lang)
156
 
157
  run_button.click(run_pipeline, inputs=[input_mode, pdf_input, text_input, translate_checkbox, source_lang, target_lang, description], outputs=[audio_output, markdown_output])