siddop commited on
Commit
b3c8f90
1 Parent(s): 523dcb2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -8
app.py CHANGED
@@ -198,14 +198,26 @@ def predict_label(df):
198
  def clear():
199
  print('worked')
200
 
201
- with gr.Blocks() as iface:
202
- title = "Recipe Generator"
203
- description = "This app lets you input the ingredients you have at home. Based on the ingredients it then generates a recipe. Use this app and remove dinner cooking stress from your life"
204
- input = gr.Textbox(label='User input', placeholder='Enter the ingredients you have')
205
- output = [gr.Textbox(label='Dish'), gr.Textbox(label='All ingredients'), gr.Textbox(label='Instructions')]
206
- predict_btn = gr.Button("Predict")
207
- predict_btn.click(fn=predict_label, inputs=input, outputs=output, api_name="recipe_predict")
208
- gr.ClearButton([input] + output)
 
 
 
 
 
 
 
 
 
 
 
 
209
 
210
  # Launch the Gradio interface
211
  iface.launch(share=True)
 
198
  def clear():
199
  print('worked')
200
 
201
+ # with gr.Blocks() as iface:
202
+ # title = "Recipe Generator"
203
+ # description = "This app lets you input the ingredients you have at home. Based on the ingredients it then generates a recipe. Use this app and remove dinner cooking stress from your life"
204
+ # input = gr.Textbox(label='User input', placeholder='Enter the ingredients you have')
205
+ # output = [gr.Textbox(label='Dish'), gr.Textbox(label='All ingredients'), gr.Textbox(label='Instructions')]
206
+ # predict_btn = gr.Button("Predict")
207
+ # predict_btn.click(fn=predict_label, inputs=input, outputs=output, api_name="recipe_predict")
208
+ # gr.ClearButton([input] + output)
209
+
210
+ # Create the Gradio Interface
211
+ iface = gr.Interface(
212
+ fn=predict_label,
213
+ inputs=gr.Textbox(label='User input', placeholder='Enter the ingredients you have'),
214
+ outputs=[gr.Textbox(label='Dish'), gr.Textbox(label='All ingredients'), gr.Textbox(label='Instructions')],
215
+ title="Recipe Generator",
216
+ description="This app lets you input the ingredients you have at home. Based on the ingredients, it then generates a recipe. Use this app and remove dinner cooking stress from your life.",
217
+ theme="default",
218
+ live=False
219
+ )
220
+
221
 
222
  # Launch the Gradio interface
223
  iface.launch(share=True)