Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,11 +14,11 @@ client=InferenceClient("Qwen/Qwen2.5-72B-Instruct")
|
|
| 14 |
|
| 15 |
#Step 2 (read file)
|
| 16 |
# Open the water_cycle.txt file in read mode with UTF-8 encoding
|
| 17 |
-
with open("
|
| 18 |
# Read the entire contents of the file and store it in a variable
|
| 19 |
-
|
| 20 |
# Print the text below
|
| 21 |
-
print(
|
| 22 |
|
| 23 |
#From Step 3 Semantic Search (chunk data)
|
| 24 |
def preprocess_text(text):
|
|
@@ -45,7 +45,7 @@ def preprocess_text(text):
|
|
| 45 |
return cleaned_chunks
|
| 46 |
|
| 47 |
# Call the preprocess_text function and store the result in a cleaned_chunks variable
|
| 48 |
-
cleaned_chunks = preprocess_text(
|
| 49 |
|
| 50 |
|
| 51 |
#From Step 4
|
|
|
|
| 14 |
|
| 15 |
#Step 2 (read file)
|
| 16 |
# Open the water_cycle.txt file in read mode with UTF-8 encoding
|
| 17 |
+
with open("info.txt", "r", encoding="utf-8") as file:
|
| 18 |
# Read the entire contents of the file and store it in a variable
|
| 19 |
+
info_text = file.read()
|
| 20 |
# Print the text below
|
| 21 |
+
print(info_text)
|
| 22 |
|
| 23 |
#From Step 3 Semantic Search (chunk data)
|
| 24 |
def preprocess_text(text):
|
|
|
|
| 45 |
return cleaned_chunks
|
| 46 |
|
| 47 |
# Call the preprocess_text function and store the result in a cleaned_chunks variable
|
| 48 |
+
cleaned_chunks = preprocess_text(info_text)
|
| 49 |
|
| 50 |
|
| 51 |
#From Step 4
|