Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,12 +53,12 @@ with gr.Blocks() as demo:
|
|
| 53 |
show_label=False
|
| 54 |
)
|
| 55 |
|
| 56 |
-
# Examples section
|
| 57 |
gr.Examples(
|
| 58 |
examples=["العاصمة د <mask> هي الرباط","المغرب <mask> زوين","انا سميتي مريم، و كنسكن ف<mask> العاصمة دفلسطين"],
|
| 59 |
inputs=input_text,
|
| 60 |
-
fn=predict,
|
| 61 |
-
outputs=output_labels,
|
| 62 |
cache_examples=True
|
| 63 |
)
|
| 64 |
|
|
@@ -66,8 +66,7 @@ with gr.Blocks() as demo:
|
|
| 66 |
submit_btn.click(
|
| 67 |
predict,
|
| 68 |
inputs=input_text,
|
| 69 |
-
outputs=output_labels
|
| 70 |
-
show_progress=True
|
| 71 |
)
|
| 72 |
|
| 73 |
clear_btn.click(
|
|
@@ -75,6 +74,6 @@ with gr.Blocks() as demo:
|
|
| 75 |
outputs=input_text
|
| 76 |
)
|
| 77 |
|
| 78 |
-
# Launch the app with queue
|
| 79 |
-
demo.queue(
|
| 80 |
demo.launch()
|
|
|
|
| 53 |
show_label=False
|
| 54 |
)
|
| 55 |
|
| 56 |
+
# Examples section with basic configuration
|
| 57 |
gr.Examples(
|
| 58 |
examples=["العاصمة د <mask> هي الرباط","المغرب <mask> زوين","انا سميتي مريم، و كنسكن ف<mask> العاصمة دفلسطين"],
|
| 59 |
inputs=input_text,
|
| 60 |
+
fn=predict,
|
| 61 |
+
outputs=output_labels,
|
| 62 |
cache_examples=True
|
| 63 |
)
|
| 64 |
|
|
|
|
| 66 |
submit_btn.click(
|
| 67 |
predict,
|
| 68 |
inputs=input_text,
|
| 69 |
+
outputs=output_labels
|
|
|
|
| 70 |
)
|
| 71 |
|
| 72 |
clear_btn.click(
|
|
|
|
| 74 |
outputs=input_text
|
| 75 |
)
|
| 76 |
|
| 77 |
+
# Launch the app with simple queue
|
| 78 |
+
demo.queue() # No parameters for older Gradio versions
|
| 79 |
demo.launch()
|