MAJED94760 commited on
Commit
89a44a8
·
verified ·
1 Parent(s): d3723f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,12 +1,12 @@
1
  from transformers import pipeline
2
 
3
- # Load a suitable text generation model
4
- generator = pipeline('text-generation', model='distilgpt2')
5
 
6
  # Ask the user for the available ingredients
7
  ingredients = input("Enter the ingredients you have (separate with ','): ")
8
 
9
- # 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
 
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