Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -125,7 +125,7 @@ with gr.Blocks(title="Fast Translation App") as iface:
|
|
125 |
translate_btn = gr.Button("Translate")
|
126 |
translate_btn.click(fn=translate, inputs=[direction, input_text], outputs=output_text)
|
127 |
|
128 |
-
# Add examples
|
129 |
gr.Examples(
|
130 |
examples=[
|
131 |
["English to Spanish", "Hello, how are you today?"],
|
@@ -134,8 +134,9 @@ with gr.Blocks(title="Fast Translation App") as iface:
|
|
134 |
["Korean to English", "μ€λ λ μ¨κ° μ’μ΅λλ€."]
|
135 |
],
|
136 |
inputs=[direction, input_text],
|
|
|
137 |
outputs=output_text,
|
138 |
-
cache_examples=True
|
139 |
)
|
140 |
|
141 |
# Launch with optimized settings
|
|
|
125 |
translate_btn = gr.Button("Translate")
|
126 |
translate_btn.click(fn=translate, inputs=[direction, input_text], outputs=output_text)
|
127 |
|
128 |
+
# Add examples - FIXED VERSION
|
129 |
gr.Examples(
|
130 |
examples=[
|
131 |
["English to Spanish", "Hello, how are you today?"],
|
|
|
134 |
["Korean to English", "μ€λ λ μ¨κ° μ’μ΅λλ€."]
|
135 |
],
|
136 |
inputs=[direction, input_text],
|
137 |
+
fn=translate, # Added the missing function parameter
|
138 |
outputs=output_text,
|
139 |
+
cache_examples=True
|
140 |
)
|
141 |
|
142 |
# Launch with optimized settings
|