tonic commited on
Commit
bdfea90
1 Parent(s): 4889640

language list and prompt engineering ;-)

Browse files
Files changed (1) hide show
  1. app.py +30 -28
app.py CHANGED
@@ -174,7 +174,9 @@ iface = gr.Interface(
174
  gr.Image(type="pil", label="Camera Input"),
175
  gr.File(label="File Upload"),
176
  gr.Audio(sources="microphone", type="filepath", label="Mic Input"),
177
- gr.Textbox(lines=2, label="Text Input")
 
 
178
  ],
179
  outputs=[
180
  RichTextbox(label="Processed Text"),
@@ -222,34 +224,34 @@ if __name__ == "__main__":
222
 
223
 
224
 
225
- iface = gr.Interface(
226
- fn=process_input,
227
- inputs=[
228
- gr.Image(type="pil", label="Camera Input"),
229
- gr.File(label="File Upload"),
230
- gr.Audio(sources="microphone", type="filepath", label="Mic Input"),
231
- gr.Textbox(lines=2, label="Text Input"),
232
- gr.Dropdown(choices=TEXT_SOURCE_LANGUAGE_NAMES, label="Input Language"),
233
- gr.Dropdown(choices=TEXT_SOURCE_LANGUAGE_NAMES, label="Target Language")
234
- ],
235
- outputs=[
236
- gr.RichTextbox(label="Processed Text"),
237
- gr.Audio(label="Audio Output")
238
- ],
239
- title="OCR and Speech Processing App",
240
- description="This app processes images, PDFs, and audio inputs to generate text and audio outputs."
241
- )
242
 
243
- if __name__ == "__main__":
244
- iface.launch()
245
 
246
- demo = gr.Interface(
247
- lambda x:x,
248
- RichTextbox(), # interactive version of your component
249
- RichTextbox(), # static version of your component
250
- examples=[[example]], # uncomment this line to view the "example version" of your component
251
- )
252
 
253
 
254
- if __name__ == "__main__":
255
- demo.launch()
 
174
  gr.Image(type="pil", label="Camera Input"),
175
  gr.File(label="File Upload"),
176
  gr.Audio(sources="microphone", type="filepath", label="Mic Input"),
177
+ gr.Textbox(lines=2, label="Text Input"),
178
+ gr.Dropdown(choices=TEXT_SOURCE_LANGUAGE_NAMES, label="Input Language"),
179
+ gr.Dropdown(choices=TEXT_SOURCE_LANGUAGE_NAMES, label="Target Language")
180
  ],
181
  outputs=[
182
  RichTextbox(label="Processed Text"),
 
224
 
225
 
226
 
227
+ # iface = gr.Interface(
228
+ # fn=process_input,
229
+ # inputs=[
230
+ # gr.Image(type="pil", label="Camera Input"),
231
+ # gr.File(label="File Upload"),
232
+ # gr.Audio(sources="microphone", type="filepath", label="Mic Input"),
233
+ # gr.Textbox(lines=2, label="Text Input"),
234
+ # gr.Dropdown(choices=TEXT_SOURCE_LANGUAGE_NAMES, label="Input Language"),
235
+ # gr.Dropdown(choices=TEXT_SOURCE_LANGUAGE_NAMES, label="Target Language")
236
+ # ],
237
+ # outputs=[
238
+ # gr.RichTextbox(label="Processed Text"),
239
+ # gr.Audio(label="Audio Output")
240
+ # ],
241
+ # title="OCR and Speech Processing App",
242
+ # description="This app processes images, PDFs, and audio inputs to generate text and audio outputs."
243
+ # )
244
 
245
+ # if __name__ == "__main__":
246
+ # # iface.launch()
247
 
248
+ # demo = gr.Interface(
249
+ # lambda x:x,
250
+ # RichTextbox(), # interactive version of your component
251
+ # RichTextbox(), # static version of your component
252
+ # examples=[[example]], # uncomment this line to view the "example version" of your component
253
+ # )
254
 
255
 
256
+ # if __name__ == "__main__":
257
+ # demo.launch()