Spaces:
Build error
Build error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from recipe_suggestions import get_recipe_suggestion
|
| 3 |
+
|
| 4 |
+
def recipe_finder(ingredients):
|
| 5 |
+
# Call the function to get recipe based on ingredients
|
| 6 |
+
return get_recipe_suggestion(ingredients)
|
| 7 |
+
|
| 8 |
+
# Create a Gradio interface
|
| 9 |
+
iface = gr.Interface(fn=recipe_finder,
|
| 10 |
+
inputs=gr.Textbox(label="Enter Ingredients (comma-separated)"),
|
| 11 |
+
outputs=gr.Textbox(label="Suggested Dish"))
|
| 12 |
+
|
| 13 |
+
# Launch the interface
|
| 14 |
+
iface.launch()
|