twiga2 commited on
Commit
947b71d
·
1 Parent(s): f6e008f
Files changed (5) hide show
  1. app.py +31 -0
  2. muffin.png +0 -0
  3. pizza.png +0 -0
  4. requirements.txt +3 -0
  5. spaghetti.png +0 -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
+ app.launch()
muffin.png ADDED
pizza.png ADDED
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ pandas
2
+ PIL
3
+ requests
spaghetti.png ADDED