Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,8 +30,12 @@ def display_word():
|
|
| 30 |
global current_index
|
| 31 |
word_translation = word_translations[current_index]
|
| 32 |
current_index = (current_index + 1) % len(word_translations)
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
# Create a Gradio interface
|
| 36 |
iface = gr.Interface(
|
| 37 |
fn=display_word,
|
|
|
|
| 30 |
global current_index
|
| 31 |
word_translation = word_translations[current_index]
|
| 32 |
current_index = (current_index + 1) % len(word_translations)
|
| 33 |
+
display_html = f"Word: {word_translation['word']}<br>"
|
| 34 |
+
display_html += f"Translation: {word_translation['translation']}<br>"
|
| 35 |
+
display_html += f"<br><img src='{word_translation['image_url']}' width='200'><br>"
|
| 36 |
+
display_html += f"<br><iframe src='{word_translation['link']}' width=\'100%\' height=\'500px\'></iframe>"
|
| 37 |
+
return display_html
|
| 38 |
+
|
| 39 |
# Create a Gradio interface
|
| 40 |
iface = gr.Interface(
|
| 41 |
fn=display_word,
|