Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,8 @@
|
|
1 |
-
# app.py
|
2 |
-
|
3 |
import gradio as gr
|
4 |
|
5 |
# Custom function to return HTML output
|
6 |
def custom_html_output(input_text):
|
7 |
-
return {
|
8 |
-
"html": f"<div style='color: blue; border: 1px solid black; padding: 10px;'>Your input was: {input_text}</div>"
|
9 |
-
}
|
10 |
|
11 |
# Description with custom HTML
|
12 |
description_content = """
|
@@ -18,7 +14,7 @@ For more details, check out our <a href="https://www.example.com" target="_blank
|
|
18 |
iface = gr.Interface(
|
19 |
fn=custom_html_output,
|
20 |
inputs="text",
|
21 |
-
outputs=
|
22 |
description=description_content
|
23 |
)
|
24 |
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
# Custom function to return HTML output
|
4 |
def custom_html_output(input_text):
|
5 |
+
return f"<div style='color: blue; border: 1px solid black; padding: 10px;'>Your input was: {input_text}</div>"
|
|
|
|
|
6 |
|
7 |
# Description with custom HTML
|
8 |
description_content = """
|
|
|
14 |
iface = gr.Interface(
|
15 |
fn=custom_html_output,
|
16 |
inputs="text",
|
17 |
+
outputs=gr.outputs.HTML(),
|
18 |
description=description_content
|
19 |
)
|
20 |
|