Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,17 +1,19 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
css = """
|
| 4 |
-
#
|
| 5 |
color: red !important;
|
|
|
|
| 6 |
}
|
| 7 |
-
#
|
| 8 |
color: purple !important;
|
|
|
|
| 9 |
}
|
| 10 |
"""
|
| 11 |
|
| 12 |
with gr.Blocks(css=css) as demo:
|
| 13 |
-
gr.Markdown("<span style='color:blue; font-weight:bold; padding:5px; border-radius:4px;'>My Label</span>")
|
| 14 |
with gr.Row():
|
|
|
|
| 15 |
txt1 = gr.Textbox(label="Input 1", elem_id="input1")
|
| 16 |
txt2 = gr.Textbox(label="Input 2", elem_id="input2")
|
| 17 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
css = """
|
| 4 |
+
#input1_label {
|
| 5 |
color: red !important;
|
| 6 |
+
font-weight: bold;
|
| 7 |
}
|
| 8 |
+
#input2_label {
|
| 9 |
color: purple !important;
|
| 10 |
+
font-weight: bold;
|
| 11 |
}
|
| 12 |
"""
|
| 13 |
|
| 14 |
with gr.Blocks(css=css) as demo:
|
|
|
|
| 15 |
with gr.Row():
|
| 16 |
+
# Assign elem_id to Textbox and Gradio automatically creates label with id = elem_id + "_label"
|
| 17 |
txt1 = gr.Textbox(label="Input 1", elem_id="input1")
|
| 18 |
txt2 = gr.Textbox(label="Input 2", elem_id="input2")
|
| 19 |
|