OmPrakashSingh1704 commited on
Commit
35f6ab6
1 Parent(s): e81c2f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -67,7 +67,7 @@ def get_recommendations(user_description, count_vectorizer, count_matrix):
67
  cosine_similarities = cosine_similarity(user_vector, count_matrix).flatten()
68
  similar_indices = cosine_similarities.argsort()[::-1]
69
  return similar_indices
70
- @st.experimental_fragment
71
  def show_recipe(recipe):
72
  with spinner("HANG TIGHT, RECIPE INCOMING..."):
73
  name_and_dis = f'# {recipe["name"]}\n\n'
@@ -93,7 +93,7 @@ def show_recipe(recipe):
93
  with col02:
94
  cont = container(border=True, height=500)
95
  with cont:st.write(instructions)
96
- @st.experimental_fragment
97
  def cooking():
98
  client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
99
 
@@ -315,7 +315,7 @@ def cooking():
315
 
316
  if st.session_state.recipe is not None:
317
  st.divider()
318
- print(st.session_state.recipe)
319
  recipe = json.loads(st.session_state.recipe)
320
  show_recipe(recipe)
321
  recipe['timestamp'] = str(datetime.datetime.now())
@@ -350,7 +350,7 @@ def rsaved():
350
  # get all saved files
351
  directory_path = 'data'
352
  recipes = load_saved_recipes_from_pickle(directory_path)
353
- print(recipes)
354
 
355
  cols = st.columns([4, 1])
356
  with cols[1]:
@@ -376,7 +376,7 @@ def rsaved():
376
  show_recipe(filtered_recipes[0])
377
  else:
378
  st.write("No recipe found.")
379
- @st.experimental_fragment
380
  def mart():
381
  st.markdown("# :eyes: PEOPLE SEARCHING FOR...")
382
  print(st.session_state.ind)
@@ -432,7 +432,7 @@ def mart():
432
  with expander("## :desktop_computer: LOOKING FOR SOMETHING ELSE..."):
433
  pygwalerapp(df).explorer()
434
  # Initialize the inference client for the Mixtral model
435
- @st.experimental_fragment
436
  def tabs():
437
  return st.tabs(['COOK','SAVED'])
438
  if not mode:
 
67
  cosine_similarities = cosine_similarity(user_vector, count_matrix).flatten()
68
  similar_indices = cosine_similarities.argsort()[::-1]
69
  return similar_indices
70
+ @st.fragment
71
  def show_recipe(recipe):
72
  with spinner("HANG TIGHT, RECIPE INCOMING..."):
73
  name_and_dis = f'# {recipe["name"]}\n\n'
 
93
  with col02:
94
  cont = container(border=True, height=500)
95
  with cont:st.write(instructions)
96
+ @st.fragment
97
  def cooking():
98
  client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
99
 
 
315
 
316
  if st.session_state.recipe is not None:
317
  st.divider()
318
+ # print(st.session_state.recipe)
319
  recipe = json.loads(st.session_state.recipe)
320
  show_recipe(recipe)
321
  recipe['timestamp'] = str(datetime.datetime.now())
 
350
  # get all saved files
351
  directory_path = 'data'
352
  recipes = load_saved_recipes_from_pickle(directory_path)
353
+ # print(recipes)
354
 
355
  cols = st.columns([4, 1])
356
  with cols[1]:
 
376
  show_recipe(filtered_recipes[0])
377
  else:
378
  st.write("No recipe found.")
379
+ @st.fragment
380
  def mart():
381
  st.markdown("# :eyes: PEOPLE SEARCHING FOR...")
382
  print(st.session_state.ind)
 
432
  with expander("## :desktop_computer: LOOKING FOR SOMETHING ELSE..."):
433
  pygwalerapp(df).explorer()
434
  # Initialize the inference client for the Mixtral model
435
+ @st.fragment
436
  def tabs():
437
  return st.tabs(['COOK','SAVED'])
438
  if not mode: