Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
# Load a model from Hugging Face for recipe generation
|
5 |
-
model = pipeline("
|
6 |
# Recipe generation function
|
7 |
def suggest_recipes(ingredients):
|
8 |
prompt = f"You are an expert in cooking. Please suggest 3 recipes using the following ingredients: {ingredients}. Provide a title for each recipe, include preparation time, and list step-by-step directions."
|
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
# Load a model from Hugging Face for recipe generation
|
5 |
+
model = pipeline("text-generation", model="openai-community/gpt2-large")
|
6 |
# Recipe generation function
|
7 |
def suggest_recipes(ingredients):
|
8 |
prompt = f"You are an expert in cooking. Please suggest 3 recipes using the following ingredients: {ingredients}. Provide a title for each recipe, include preparation time, and list step-by-step directions."
|