Boadiwaa commited on
Commit
d2ae85c
·
verified ·
1 Parent(s): 5a04c58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -17
app.py CHANGED
@@ -36,24 +36,17 @@ def inference(recipe_titles):
36
  output = get_open_ai_output(recipe_titles)
37
  return output
38
 
39
- input = gr.Textbox(label="Food Ingredient",max_lines=1, placeholder = "Enter ONE food ingredient here")
40
- output = gr.Textbox(label="Recipe")
41
-
42
- with gr.Blocks(css = ".gradio-container {background-color: #E7ECF3}") as demo:
43
-
44
- gr.Interface(
45
- inference,
46
- input,output,title = """
47
 
48
  # **<span style="color:#3526A">Something Sweet...</span>**
49
 
50
  """ ,
51
- description = "**Generate different recipes from just ONE ingredient!**", allow_flagging="never")
52
- gr.Examples(
53
- [["Milk"], ["Butter"]],
54
- input, output,
55
- inference,
56
- cache_examples= False)
57
- demo.launch(enable_queue=True)
58
-
59
-
 
36
  output = get_open_ai_output(recipe_titles)
37
  return output
38
 
39
+ demo = gr.Interface(fn=inference,
40
+ inputs=gr.Text(label="Ingredient"),
41
+ outputs=[gr.Textbox(label="Recipe", lines=20)],
42
+ title = """
 
 
 
 
43
 
44
  # **<span style="color:#3526A">Something Sweet...</span>**
45
 
46
  """ ,
47
+ description = "**Generate different recipes from just ONE ingredient!**", allow_flagging="never",
48
+
49
+ examples = [["Milk"], ["Butter"]] )
50
+
51
+ if __name__ == "__main__":
52
+ demo.launch()