Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,8 +14,29 @@ His llama is thoughtful. \
|
|
| 14 |
We all have nice pets!"""
|
| 15 |
|
| 16 |
|
| 17 |
-
text_translated = translator(text,
|
| 18 |
-
src_lang="eng_Latn",
|
| 19 |
-
tgt_lang="fra_Latn")
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
We all have nice pets!"""
|
| 15 |
|
| 16 |
|
| 17 |
+
#text_translated = translator(text,
|
| 18 |
+
# src_lang="eng_Latn",
|
| 19 |
+
# tgt_lang="fra_Latn")#
|
| 20 |
+
#
|
| 21 |
+
#text_translated
|
| 22 |
|
| 23 |
+
import gradio as gr
|
| 24 |
+
|
| 25 |
+
# Create a custom HTML component with the label
|
| 26 |
+
label_html = """
|
| 27 |
+
<div style="font-size: 18px; font-weight: bold; margin-bottom: 10px;">Custom Label:</div>
|
| 28 |
+
<div id="custom-label" style="font-size: 16px;">Hi</div>
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
# Create a Gradio interface
|
| 32 |
+
interface = gr.Interface(
|
| 33 |
+
fn=None, # No function needed for this example
|
| 34 |
+
inputs=None, # No input components
|
| 35 |
+
outputs="html", # Output displayed as HTML
|
| 36 |
+
live=True, # Enable live updates
|
| 37 |
+
title="Custom Label Example",
|
| 38 |
+
html=label_html,
|
| 39 |
+
)
|
| 40 |
+
|
| 41 |
+
# Launch the Gradio app
|
| 42 |
+
interface.launch()
|