Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ NEBIUS_API_KEY = "NEBIUS_API_KEY"
|
|
| 5 |
FOLDER_ID = "FOLDER_ID"
|
| 6 |
|
| 7 |
def generate_recipe(dietary_pref, ingredients):
|
| 8 |
-
input_text = f"Create a recipe using these ingredients:
|
| 9 |
|
| 10 |
headers = {
|
| 11 |
"Authorization": f"Api-Key {NEBIUS_API_KEY}",
|
|
@@ -49,6 +49,6 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 49 |
|
| 50 |
recipe_output = gr.Textbox(label="AI-Generated Recipe", lines=10)
|
| 51 |
|
| 52 |
-
submit.click(fn=generate_recipe, inputs=[dietary,
|
| 53 |
|
| 54 |
demo.launch()
|
|
|
|
| 5 |
FOLDER_ID = "FOLDER_ID"
|
| 6 |
|
| 7 |
def generate_recipe(dietary_pref, ingredients):
|
| 8 |
+
input_text = f"Create a recipe using these ingredients: {ingredients}. It should be {dietary_pref}."
|
| 9 |
|
| 10 |
headers = {
|
| 11 |
"Authorization": f"Api-Key {NEBIUS_API_KEY}",
|
|
|
|
| 49 |
|
| 50 |
recipe_output = gr.Textbox(label="AI-Generated Recipe", lines=10)
|
| 51 |
|
| 52 |
+
submit.click(fn=generate_recipe, inputs=[dietary, ingredients], outputs=recipe_output)
|
| 53 |
|
| 54 |
demo.launch()
|