Spaces:
Runtime error
Runtime error
tonic
commited on
Commit
·
bdfea90
1
Parent(s):
4889640
language list and prompt engineering ;-)
Browse files
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 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
)
|
| 242 |
|
| 243 |
-
if __name__ == "__main__":
|
| 244 |
-
|
| 245 |
|
| 246 |
-
demo = gr.Interface(
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
)
|
| 252 |
|
| 253 |
|
| 254 |
-
if __name__ == "__main__":
|
| 255 |
-
|
|
|
|
| 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()
|