Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
from transformers import pipeline
|
2 |
|
3 |
-
# Load a
|
4 |
-
generator = pipeline('text-generation', model='
|
5 |
|
6 |
# Ask the user for the available ingredients
|
7 |
ingredients = input("Enter the ingredients you have (separate with ','): ")
|
8 |
|
9 |
-
#
|
10 |
prompt = f"Generate a recipe that can be made with the following ingredients: {ingredients}. Make it a simple and easy recipe."
|
11 |
|
12 |
# Generate the text based on the prompt
|
|
|
1 |
from transformers import pipeline
|
2 |
|
3 |
+
# Load a text generation model
|
4 |
+
generator = pipeline('text-generation', model='gpt2')
|
5 |
|
6 |
# Ask the user for the available ingredients
|
7 |
ingredients = input("Enter the ingredients you have (separate with ','): ")
|
8 |
|
9 |
+
# Create the prompt for generating a recipe
|
10 |
prompt = f"Generate a recipe that can be made with the following ingredients: {ingredients}. Make it a simple and easy recipe."
|
11 |
|
12 |
# Generate the text based on the prompt
|