Rename app.py to test.py
Browse files- app.py → test.py +2 -15
app.py → test.py
RENAMED
|
@@ -15,10 +15,7 @@ def get_open_ai_output(recipe_titles):
|
|
| 15 |
response = response.choices[0].message.content
|
| 16 |
return response
|
| 17 |
|
| 18 |
-
|
| 19 |
-
result = "This works" + input
|
| 20 |
-
return result
|
| 21 |
-
demo = gr.Interface(fn=test,
|
| 22 |
inputs=gr.Textbox(label="Ingredient"),
|
| 23 |
outputs=gr.Textbox(label="Recipe", lines=20),
|
| 24 |
title = """
|
|
@@ -27,16 +24,6 @@ demo = gr.Interface(fn=test,
|
|
| 27 |
|
| 28 |
""" ,
|
| 29 |
description = "**Generate different recipes from just ONE ingredient!**", allow_flagging="never")
|
| 30 |
-
def greet(name):
|
| 31 |
-
return "Hello, " + name
|
| 32 |
-
|
| 33 |
-
#demo.launch()
|
| 34 |
-
demo2 = gr.Interface(
|
| 35 |
-
fn=greet,
|
| 36 |
-
inputs=["text"],
|
| 37 |
-
outputs=["text"],
|
| 38 |
-
)
|
| 39 |
|
| 40 |
if __name__ == "__main__":
|
| 41 |
-
|
| 42 |
-
demo2.launch()
|
|
|
|
| 15 |
response = response.choices[0].message.content
|
| 16 |
return response
|
| 17 |
|
| 18 |
+
demo = gr.Interface(fn=get_open_ai_output,
|
|
|
|
|
|
|
|
|
|
| 19 |
inputs=gr.Textbox(label="Ingredient"),
|
| 20 |
outputs=gr.Textbox(label="Recipe", lines=20),
|
| 21 |
title = """
|
|
|
|
| 24 |
|
| 25 |
""" ,
|
| 26 |
description = "**Generate different recipes from just ONE ingredient!**", allow_flagging="never")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
if __name__ == "__main__":
|
| 29 |
+
demo.launch()
|
|
|