stonapse64
commited on
Commit
·
e64b883
1
Parent(s):
676bd86
Added table
Browse files
app.py
CHANGED
|
@@ -1,16 +1,35 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
def greeting(name):
|
| 5 |
return f"Hello {name}"
|
| 6 |
|
| 7 |
|
| 8 |
-
bellamy_bowie = gr.Interface(greeting, "text", "text")
|
| 9 |
urly_murly_simmy = gr.Interface(lambda name: "Hello " + name, "text", "text")
|
| 10 |
ellis_cappy = gr.Interface(lambda name: "Hello " + name, "text", "text")
|
| 11 |
|
| 12 |
demo = gr.TabbedInterface(
|
| 13 |
[bellamy_bowie, urly_murly_simmy, ellis_cappy],
|
| 14 |
-
["Bellamy Bowie", "Urly & Murly Simmy", "Ellis Cappy"])
|
| 15 |
|
| 16 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
bellamy_bowie_description = """
|
| 4 |
+
<table>
|
| 5 |
+
<tr>
|
| 6 |
+
<th>Person 1</th>
|
| 7 |
+
<th>Person 2</th>
|
| 8 |
+
<th>Person 3</th>
|
| 9 |
+
</tr>
|
| 10 |
+
<tr>
|
| 11 |
+
<td>Emil</td>
|
| 12 |
+
<td>Tobias</td>
|
| 13 |
+
<td>Linus</td>
|
| 14 |
+
</tr>
|
| 15 |
+
<tr>
|
| 16 |
+
<td>16</td>
|
| 17 |
+
<td>14</td>
|
| 18 |
+
<td>10</td>
|
| 19 |
+
</tr>
|
| 20 |
+
</table>
|
| 21 |
+
"""
|
| 22 |
|
| 23 |
def greeting(name):
|
| 24 |
return f"Hello {name}"
|
| 25 |
|
| 26 |
|
| 27 |
+
bellamy_bowie = gr.Interface(greeting, "text", "text", description=bellamy_bowie_description)
|
| 28 |
urly_murly_simmy = gr.Interface(lambda name: "Hello " + name, "text", "text")
|
| 29 |
ellis_cappy = gr.Interface(lambda name: "Hello " + name, "text", "text")
|
| 30 |
|
| 31 |
demo = gr.TabbedInterface(
|
| 32 |
[bellamy_bowie, urly_murly_simmy, ellis_cappy],
|
| 33 |
+
["Bellamy Bowie", "Urly & Murly Simmy", "Ellis Cappy"], head=bellamy_bowie_description)
|
| 34 |
|
| 35 |
demo.launch()
|