ishaandtotoro commited on
Commit
b41de1a
·
verified ·
1 Parent(s): f5aff27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -2
app.py CHANGED
@@ -1,5 +1,7 @@
1
- from huggingface_hub import InferenceClient
2
-
 
 
3
  import gradio as gr
4
  import random
5
 
@@ -7,6 +9,18 @@ import random
7
  # Making requests to the model to generate responses:
8
  client = InferenceClient('Qwen/Qwen2.5-72B-Instruct')
9
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  def respond(message, history):
12
  #responses = ["Yes", "No"]
 
1
+ from huggingface_hub import InferenceClient
2
+ # Step 1 from the Semantic Search
3
+ from sentence_transformers import SentenceTransformer
4
+ import torch
5
  import gradio as gr
6
  import random
7
 
 
9
  # Making requests to the model to generate responses:
10
  client = InferenceClient('Qwen/Qwen2.5-72B-Instruct')
11
 
12
+ # Step 2 from the semantic search
13
+ # Open the water_cycle.txt file in read mode with UTF-8 encoding
14
+ with open("water_cycle.txt", "r", encoding="utf-8") as file:
15
+ # Read the entire contents of the file and store it in a variable
16
+ water_cycle_text = file.read()
17
+
18
+ # Print the text below
19
+ print(water_cycle_text)
20
+
21
+
22
+
23
+
24
 
25
  def respond(message, history):
26
  #responses = ["Yes", "No"]