Update app.py
Browse files
app.py
CHANGED
@@ -50,10 +50,11 @@ if rus_buton:
|
|
50 |
else:
|
51 |
ingredients = st.text_area("Write the ingredients of the dish")
|
52 |
recipe = st.text_area("Write the recipe")
|
53 |
-
servings =
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
50 |
else:
|
51 |
ingredients = st.text_area("Write the ingredients of the dish")
|
52 |
recipe = st.text_area("Write the recipe")
|
53 |
+
servings = st.text_area("Write number of servings")
|
54 |
+
if len(servings):
|
55 |
+
data = pd.DataFrame({'TranslatedInstructions':[recipe],'TranslatedIngredients':[ingredients],'Servings': [int(servings)]})
|
56 |
+
result_button = st.button('Click')
|
57 |
+
if result_button:
|
58 |
+
time = model.predict(data)[0]
|
59 |
+
st.write('The dish will be prepared')
|
60 |
+
st.write(int(time))
|