Spaces:
Running
Running
Commit
·
db9df29
1
Parent(s):
17a461e
fix errors
Browse files
app.py
CHANGED
@@ -186,6 +186,13 @@ custom_css = """
|
|
186 |
color: #7f8c8d;
|
187 |
font-size: 0.9em;
|
188 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
"""
|
190 |
|
191 |
# Create Gradio interface
|
@@ -259,26 +266,26 @@ with gr.Blocks(css=custom_css) as demo:
|
|
259 |
translate_btn = gr.Button("✨ Translate ✨", elem_classes="translate-button")
|
260 |
|
261 |
# Fun greeting examples with language-appropriate phrases
|
262 |
-
gr.
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
|
283 |
# Set up translation function
|
284 |
translate_btn.click(
|
|
|
186 |
color: #7f8c8d;
|
187 |
font-size: 0.9em;
|
188 |
}
|
189 |
+
.examples-container {
|
190 |
+
margin-top: 20px;
|
191 |
+
padding: 15px;
|
192 |
+
background-color: #f8f9fa;
|
193 |
+
border-radius: 10px;
|
194 |
+
border: 2px dashed #b2bec3;
|
195 |
+
}
|
196 |
"""
|
197 |
|
198 |
# Create Gradio interface
|
|
|
266 |
translate_btn = gr.Button("✨ Translate ✨", elem_classes="translate-button")
|
267 |
|
268 |
# Fun greeting examples with language-appropriate phrases
|
269 |
+
with gr.Column(elem_classes="examples-container"):
|
270 |
+
gr.Markdown("### Try these fun examples! 🎉", elem_classes="subtitle")
|
271 |
+
|
272 |
+
examples = [
|
273 |
+
["Hello, how are you today? I'm having a wonderful day!"],
|
274 |
+
["I would like to visit Japan someday and see the cherry blossoms."],
|
275 |
+
["Bonjour, comment allez-vous aujourd'hui? Je passe une journée merveilleuse!"],
|
276 |
+
["J'aimerais visiter le Japon un jour et voir les cerisiers en fleurs."],
|
277 |
+
["こんにちは、今日はお元気ですか?素晴らしい一日を過ごしています!"],
|
278 |
+
["いつか日本を訪れて桜を見たいです。"],
|
279 |
+
["Hola, ¿cómo estás hoy? ¡Estoy teniendo un día maravilloso!"],
|
280 |
+
["Me gustaría visitar Japón algún día y ver los cerezos en flor."],
|
281 |
+
["你好,今天好吗?我今天过得很愉快!"],
|
282 |
+
["我希望有一天能去日本看樱花。"]
|
283 |
+
]
|
284 |
+
|
285 |
+
gr.Examples(
|
286 |
+
examples=examples,
|
287 |
+
inputs=source_text
|
288 |
+
)
|
289 |
|
290 |
# Set up translation function
|
291 |
translate_btn.click(
|