raghavNCI
commited on
Commit
·
02f3cf9
1
Parent(s):
c1ba890
hf_xet and a print
Browse files- question.py +2 -0
- requirements.txt +1 -0
question.py
CHANGED
@@ -28,6 +28,8 @@ async def ask_question(input: QuestionInput):
|
|
28 |
keywords = re.findall(r"\b\w{4,}\b", question)
|
29 |
query_string = "+".join(keywords[:5]) # Limit to top 5 keywords
|
30 |
|
|
|
|
|
31 |
gnews_url = f"https://gnews.io/api/v4/search?q={query_string}&lang=en&max=3&expand=content&token={GNEWS_API_KEY}"
|
32 |
try:
|
33 |
response = requests.get(gnews_url, timeout=10)
|
|
|
28 |
keywords = re.findall(r"\b\w{4,}\b", question)
|
29 |
query_string = "+".join(keywords[:5]) # Limit to top 5 keywords
|
30 |
|
31 |
+
print("Keywords are", query_string);
|
32 |
+
|
33 |
gnews_url = f"https://gnews.io/api/v4/search?q={query_string}&lang=en&max=3&expand=content&token={GNEWS_API_KEY}"
|
34 |
try:
|
35 |
response = requests.get(gnews_url, timeout=10)
|
requirements.txt
CHANGED
@@ -5,3 +5,4 @@ python-dotenv
|
|
5 |
redis
|
6 |
transformers
|
7 |
torch
|
|
|
|
5 |
redis
|
6 |
transformers
|
7 |
torch
|
8 |
+
hf_xet
|