lyimo commited on
Commit
7c10316
·
verified ·
1 Parent(s): 33ec9ac

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -0
app.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import PIL.Image as Image
3
+
4
+
5
+ # Gradio interface
6
+
7
+ with gr.Blocks(theme=gr.themes.Soft()) as app:
8
+
9
+ Title=gr.Label("Nutri Assistant App")
10
+
11
+ with gr.Row():
12
+ Title
13
+
14
+ with gr.Row():
15
+ gr.Markdown(
16
+ "This app generates text for a given image related to nutrition in three low-resource languages")
17
+
18
+ with gr.Row():
19
+ inputs=[
20
+ gr.Image(type="pil", label="Upload an Image")
21
+
22
+ ],
23
+ with gr.Row():
24
+ outputs=[
25
+ gr.Text(label="English: "),
26
+ gr.Text(label="Yoruba: "),
27
+ gr.Text(label="Swahili: "),
28
+ gr.Text(label="Twi: ")
29
+ ]
30
+
31
+ interface.launch()