BryanBradfo commited on
Commit
db9df29
·
1 Parent(s): 17a461e

fix errors

Browse files
Files changed (1) hide show
  1. app.py +27 -20
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.Markdown("### Try these fun examples! 🎉", elem_classes="subtitle")
263
-
264
- examples = [
265
- ["Hello, how are you today? I'm having a wonderful day!"],
266
- ["I would like to visit Japan someday and see the cherry blossoms."],
267
- ["Bonjour, comment allez-vous aujourd'hui? Je passe une journée merveilleuse!"],
268
- ["J'aimerais visiter le Japon un jour et voir les cerisiers en fleurs."],
269
- ["こんにちは、今日はお元気ですか?素晴らしい一日を過ごしています!"],
270
- ["いつか日本を訪れて桜を見たいです。"],
271
- ["Hola, ¿cómo estás hoy? ¡Estoy teniendo un día maravilloso!"],
272
- ["Me gustaría visitar Japón algún día y ver los cerezos en flor."],
273
- ["你好,今天好吗?我今天过得很愉快!"],
274
- ["我希望有一天能去日本看樱花。"]
275
- ]
276
-
277
- gr.Examples(
278
- examples=examples,
279
- inputs=source_text,
280
- elem_classes="examples-grid"
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(