Spaces:
Sleeping
Sleeping
Lara Maria Meister
commited on
Commit
•
542a039
1
Parent(s):
8e78636
gradio
Browse files- app.py +24 -0
- examples/burger.jpeg +0 -0
- examples/pizza.jpg +0 -0
- examples/spagetti.jpeg +0 -0
app.py
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import os
|
3 |
+
|
4 |
+
def hello(s):
|
5 |
+
print("hello")
|
6 |
+
|
7 |
+
title = "Recipifier"
|
8 |
+
description = "blablabla"
|
9 |
+
|
10 |
+
example_list = [["examples/" + example] for example in os.listdir("examples")]
|
11 |
+
|
12 |
+
demo = gr.Interface(
|
13 |
+
fn=hello,
|
14 |
+
inputs=gr.Image(type="pil"),
|
15 |
+
outputs=[
|
16 |
+
gr.Textbox(label="Recipe"),
|
17 |
+
gr.Number(label="Prediction time (s)"),
|
18 |
+
],
|
19 |
+
examples=example_list,
|
20 |
+
title=title,
|
21 |
+
description=description,
|
22 |
+
)
|
23 |
+
|
24 |
+
demo.launch()
|
examples/burger.jpeg
ADDED
![]() |
examples/pizza.jpg
ADDED
![]() |
examples/spagetti.jpeg
ADDED
![]() |