Leilaaaah commited on
Commit
54a6f46
·
verified ·
1 Parent(s): 6e12d50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -8,13 +8,13 @@ from sentence_transformers import SentenceTransformer
8
  import torch
9
 
10
 
11
- # Step 2 from Semantic Search
12
- with open("water_cycle.txt", "r", encoding="utf-8") as file:
13
- # Read the entire contents of the file and store it in a variable
14
- water_cycle_text = file.read()
15
 
16
- # Print the text below
17
- print(water_cycle_text)
18
 
19
 
20
 
@@ -29,7 +29,8 @@ def get_recipes(ingredient):
29
  }
30
  res = requests.get(url, params=params)
31
  data = res.json()
32
- return [r["title"] for r in data["results"]]
 
33
 
34
  iface = gr.Interface(
35
  fn=get_recipes,
 
8
  import torch
9
 
10
 
11
+ # # Step 2 from Semantic Search
12
+ # with open("water_cycle.txt", "r", encoding="utf-8") as file:
13
+ # # Read the entire contents of the file and store it in a variable
14
+ # water_cycle_text = file.read()
15
 
16
+ # # Print the text below
17
+ # print(water_cycle_text)
18
 
19
 
20
 
 
29
  }
30
  res = requests.get(url, params=params)
31
  data = res.json()
32
+ # return [r["title"] for r in data["results"]]
33
+ return data
34
 
35
  iface = gr.Interface(
36
  fn=get_recipes,