Spaces:
Build error
Build error
| import gradio as gr | |
| import PIL.Image as Image | |
| def process_image(image): | |
| return "English text","Yoruba text", "Swahili text", "Twi text" | |
| app = gr.Interface( | |
| fn=process_image, | |
| inputs = gr.Image(type="pil", label="Upload an Image"), | |
| outputs = [ | |
| gr.Text(label="English: "), | |
| gr.Text(label="Yoruba: "), | |
| gr.Text(label="Swahili: "), | |
| gr.Text(label="Twi: "), | |
| ], | |
| title="Nutri Assistant App", | |
| description="This app generates text for a given image related to nutrition in three low-resource languages", | |
| examples =[["spaghetti.png"], | |
| ["cake.png"]], | |
| ) | |
| if __name__ == "__main__": | |
| app.launch() | |