File size: 1,351 Bytes
3addaf9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import gradio as gr

gr.set_static_paths(paths=["images/"])

bellamy_bowie_description = """
<table border="0">
  <tr>
    <td>Emil</td>
    <td>Tobias</td>
    <td>Linus</td>
  </tr>
  <tr>
    <td>16</td>
    <td>14</td>
    <td>10</td>
  </tr>
</table>
<img src="https://huggingface.co/spaces/stonapse/aidademo/blob/main/images/Siemens_logo.png">
"""

def greeting(name):
    return f"Hello {name}"


bellamy_bowie = gr.Interface(greeting, "text", "text", description=bellamy_bowie_description)
urly_murly_simmy = gr.Interface(lambda name: "Hello " + name, "text", "text")
ellis_cappy = gr.Interface(lambda name: "Hello " + name, "text", "text")

demo = gr.TabbedInterface(
    [bellamy_bowie, urly_murly_simmy, ellis_cappy],
    ["Bellamy Bowie", "Urly & Murly Simmy", "Ellis Cappy"], head=bellamy_bowie_description)

demo.launch()

# import gradio as gr
#
# # Paths can be a list of strings or pathlib.Path objects
# # corresponding to filenames or directories.
# gr.set_static_paths(paths=["test/test_files/"])
#
# # The example files and the default value of the input
# # will not be copied to the gradio cache and will be served directly.
# demo = gr.Interface(
#     lambda s: s.rotate(45),
#     gr.Image(value="test/test_files/cheetah1.jpg", type="pil"),
#     gr.Image(),
#     examples=["test/test_files/bus.png"],
# )
#
# demo.launch()