Spaces:
Sleeping
Sleeping
arabellastrange
commited on
Commit
•
0e9148c
1
Parent(s):
8b08747
fixed git
Browse files- .gitattributes +1 -0
- README.md +1 -0
- app.py +1 -0
- generate_response.py +1 -0
- llmsearch/show_site_stats.py +1 -0
- llmsearch/site_stats.py +0 -1
- llmsearch/utilityV2.py +0 -1
- read_write_index.py +1 -0
- requirements.txt +2 -1
- web_search.py +0 -1
.gitattributes
CHANGED
@@ -43,3 +43,4 @@ chromedriver-linux64/ filter=lfs diff=lfs merge=lfs -text
|
|
43 |
*.txt !text !filter !merge !diff
|
44 |
*.md !text !filter !merge !diff
|
45 |
/chromedriver-linux64/* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
43 |
*.txt !text !filter !merge !diff
|
44 |
*.md !text !filter !merge !diff
|
45 |
/chromedriver-linux64/* filter=lfs diff=lfs merge=lfs -text
|
46 |
+
|
README.md
CHANGED
@@ -10,3 +10,4 @@ pinned: false
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
13 |
+
|
app.py
CHANGED
@@ -5,6 +5,7 @@ from time import asctime
|
|
5 |
import gradio as gr
|
6 |
from llama_index.core import Document, VectorStoreIndex
|
7 |
|
|
|
8 |
from generate_response import generate_chat_response_with_history, set_llm, is_search_query, condense_question, \
|
9 |
generate_chat_response_with_history_rag_return_response
|
10 |
from web_search import search
|
|
|
5 |
import gradio as gr
|
6 |
from llama_index.core import Document, VectorStoreIndex
|
7 |
|
8 |
+
|
9 |
from generate_response import generate_chat_response_with_history, set_llm, is_search_query, condense_question, \
|
10 |
generate_chat_response_with_history_rag_return_response
|
11 |
from web_search import search
|
generate_response.py
CHANGED
@@ -83,6 +83,7 @@ def generate_chat_response_with_history_rag_return_response(index, message, hist
|
|
83 |
return query_engine.stream_chat(messages)
|
84 |
|
85 |
|
|
|
86 |
def generate_chat_response_with_history_rag_yield_string(index, message, history):
|
87 |
logger.info("Generating chat response with history and rag...")
|
88 |
string_output = ""
|
|
|
83 |
return query_engine.stream_chat(messages)
|
84 |
|
85 |
|
86 |
+
|
87 |
def generate_chat_response_with_history_rag_yield_string(index, message, history):
|
88 |
logger.info("Generating chat response with history and rag...")
|
89 |
string_output = ""
|
llmsearch/show_site_stats.py
CHANGED
@@ -54,3 +54,4 @@ for site in site_list:
|
|
54 |
print("*")
|
55 |
else:
|
56 |
print()
|
|
|
|
54 |
print("*")
|
55 |
else:
|
56 |
print()
|
57 |
+
|
llmsearch/site_stats.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import json
|
2 |
import random
|
3 |
import traceback
|
4 |
-
|
5 |
from llmsearch import utilityV2 as ut
|
6 |
|
7 |
|
|
|
1 |
import json
|
2 |
import random
|
3 |
import traceback
|
|
|
4 |
from llmsearch import utilityV2 as ut
|
5 |
|
6 |
|
llmsearch/utilityV2.py
CHANGED
@@ -5,7 +5,6 @@ import os
|
|
5 |
import re
|
6 |
import traceback
|
7 |
import tracemalloc
|
8 |
-
|
9 |
import nltk
|
10 |
import openai
|
11 |
# from tenacity import (retry,stop_after_attempt,stop_after_delay, wait_random_exponential)
|
|
|
5 |
import re
|
6 |
import traceback
|
7 |
import tracemalloc
|
|
|
8 |
import nltk
|
9 |
import openai
|
10 |
# from tenacity import (retry,stop_after_attempt,stop_after_delay, wait_random_exponential)
|
read_write_index.py
CHANGED
@@ -7,6 +7,7 @@ logger = logging.getLogger(__name__)
|
|
7 |
DOCUMENT_PATH = '../data'
|
8 |
|
9 |
|
|
|
10 |
# remember to delete stored vectors when new documents are added to the data so the storage is recreated
|
11 |
def read_write_index(path):
|
12 |
if not os.path.exists(path):
|
|
|
7 |
DOCUMENT_PATH = '../data'
|
8 |
|
9 |
|
10 |
+
|
11 |
# remember to delete stored vectors when new documents are added to the data so the storage is recreated
|
12 |
def read_write_index(path):
|
13 |
if not os.path.exists(path):
|
requirements.txt
CHANGED
@@ -11,4 +11,5 @@ llama-index-readers-file
|
|
11 |
selenium==4.22.0
|
12 |
unstructured
|
13 |
requests
|
14 |
-
chromium
|
|
|
|
11 |
selenium==4.22.0
|
12 |
unstructured
|
13 |
requests
|
14 |
+
chromium
|
15 |
+
|
web_search.py
CHANGED
@@ -6,7 +6,6 @@ import traceback
|
|
6 |
import urllib.parse as en
|
7 |
import warnings
|
8 |
from itertools import zip_longest
|
9 |
-
|
10 |
import requests
|
11 |
import selenium.common.exceptions
|
12 |
from selenium import webdriver
|
|
|
6 |
import urllib.parse as en
|
7 |
import warnings
|
8 |
from itertools import zip_longest
|
|
|
9 |
import requests
|
10 |
import selenium.common.exceptions
|
11 |
from selenium import webdriver
|