Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -110,7 +110,7 @@ async def server_1():
|
|
110 |
print("The important words " )
|
111 |
print(words)
|
112 |
print("x[snippet].find(words)")
|
113 |
-
print(x["snippet"].find(words))
|
114 |
if x["snippet"].find(words) != -1 :
|
115 |
print("Found word")
|
116 |
snipp_score = snipp_score + 1
|
@@ -132,11 +132,11 @@ async def server_1():
|
|
132 |
continue
|
133 |
else :
|
134 |
# skip the result
|
135 |
-
print("This is not added")
|
136 |
-
print(x["snippet"])
|
137 |
-
print("important keywords")
|
138 |
-
print(important_keywords)
|
139 |
-
print("capitalized_score")
|
140 |
print(capitalized_score)
|
141 |
print("snipp_score")
|
142 |
print(snipp_score)
|
@@ -166,13 +166,13 @@ async def server_1():
|
|
166 |
score = 0 ; cap_score = 0 ;
|
167 |
for words in important_keywords :
|
168 |
if y.find(words) != -1 :
|
169 |
-
print(y)
|
170 |
-
print(score)
|
171 |
score = score + 1
|
172 |
for words in uppercased_keywords :
|
173 |
if y.find(words) != -1 :
|
174 |
-
print(y)
|
175 |
-
print(cap_score)
|
176 |
cap_score = cap_score + 1
|
177 |
if ( score == ( len(important_keywords) ) ) and ( cap_score >= ( len(uppercased_keywords) ) ):
|
178 |
n_results[iter_x].append(y)
|
@@ -243,7 +243,7 @@ async def server_1():
|
|
243 |
similarity_scores = "There's an error in llm similarity search retrieval"
|
244 |
return similarity_scores
|
245 |
|
246 |
-
time.sleep(
|
247 |
result_processed = ""
|
248 |
## if response is all list
|
249 |
if varcontinue_similarity == 1 :
|
@@ -423,6 +423,8 @@ def process_similarity_15(sorted0, sorted1, sorted2, sorted3, actualscore0, actu
|
|
423 |
|
424 |
|
425 |
if __name__ == '__main__':
|
426 |
-
|
427 |
app.run(host='0.0.0.0', port=8081)
|
|
|
|
|
428 |
|
|
|
110 |
print("The important words " )
|
111 |
print(words)
|
112 |
print("x[snippet].find(words)")
|
113 |
+
# print(x["snippet"].find(words))
|
114 |
if x["snippet"].find(words) != -1 :
|
115 |
print("Found word")
|
116 |
snipp_score = snipp_score + 1
|
|
|
132 |
continue
|
133 |
else :
|
134 |
# skip the result
|
135 |
+
# print("This is not added")
|
136 |
+
# print(x["snippet"])
|
137 |
+
# print("important keywords")
|
138 |
+
# print(important_keywords)
|
139 |
+
# print("capitalized_score")
|
140 |
print(capitalized_score)
|
141 |
print("snipp_score")
|
142 |
print(snipp_score)
|
|
|
166 |
score = 0 ; cap_score = 0 ;
|
167 |
for words in important_keywords :
|
168 |
if y.find(words) != -1 :
|
169 |
+
# print(y)
|
170 |
+
# print(score)
|
171 |
score = score + 1
|
172 |
for words in uppercased_keywords :
|
173 |
if y.find(words) != -1 :
|
174 |
+
# print(y)
|
175 |
+
# print(cap_score)
|
176 |
cap_score = cap_score + 1
|
177 |
if ( score == ( len(important_keywords) ) ) and ( cap_score >= ( len(uppercased_keywords) ) ):
|
178 |
n_results[iter_x].append(y)
|
|
|
243 |
similarity_scores = "There's an error in llm similarity search retrieval"
|
244 |
return similarity_scores
|
245 |
|
246 |
+
time.sleep(2)
|
247 |
result_processed = ""
|
248 |
## if response is all list
|
249 |
if varcontinue_similarity == 1 :
|
|
|
423 |
|
424 |
|
425 |
if __name__ == '__main__':
|
426 |
+
|
427 |
app.run(host='0.0.0.0', port=8081)
|
428 |
+
time.sleep(4)
|
429 |
+
server_app()
|
430 |
|