AlexanderKazakov
commited on
Commit
•
dafbeb8
1
Parent(s):
3007b48
fix to start app
Browse files
.idea/misc.xml
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<project version="4">
|
3 |
-
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.
|
4 |
</project>
|
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<project version="4">
|
3 |
+
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (rag-gradio-sample-project) (2)" project-jdk-type="Python SDK" />
|
4 |
</project>
|
.idea/rag-gradio-sample-project.iml
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<module type="PYTHON_MODULE" version="4">
|
3 |
<component name="NewModuleRootManager">
|
4 |
-
<content url="file://$MODULE_DIR$"
|
5 |
-
|
|
|
|
|
6 |
<orderEntry type="sourceFolder" forTests="false" />
|
7 |
</component>
|
8 |
<component name="PyDocumentationSettings">
|
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<module type="PYTHON_MODULE" version="4">
|
3 |
<component name="NewModuleRootManager">
|
4 |
+
<content url="file://$MODULE_DIR$">
|
5 |
+
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
6 |
+
</content>
|
7 |
+
<orderEntry type="jdk" jdkName="Python 3.11 (rag-gradio-sample-project) (2)" jdkType="Python SDK" />
|
8 |
<orderEntry type="sourceFolder" forTests="false" />
|
9 |
</component>
|
10 |
<component name="PyDocumentationSettings">
|
gradio_app/app.py
CHANGED
@@ -2,9 +2,8 @@
|
|
2 |
Credit to Derek Thomas, derek@huggingface.co
|
3 |
"""
|
4 |
|
5 |
-
import subprocess
|
6 |
-
|
7 |
-
subprocess.run(["pip", "install", "--upgrade", "transformers[torch,sentencepiece]==4.34.1"])
|
8 |
|
9 |
import logging
|
10 |
from pathlib import Path
|
@@ -14,7 +13,7 @@ import gradio as gr
|
|
14 |
from jinja2 import Environment, FileSystemLoader
|
15 |
|
16 |
from backend.query_llm import generate_hf, generate_openai
|
17 |
-
from backend.semantic_search import table, retriever
|
18 |
|
19 |
VECTOR_COLUMN_NAME = ""
|
20 |
TEXT_COLUMN_NAME = ""
|
|
|
2 |
Credit to Derek Thomas, derek@huggingface.co
|
3 |
"""
|
4 |
|
5 |
+
# import subprocess
|
6 |
+
# subprocess.run(["pip", "install", "--upgrade", "transformers[torch,sentencepiece]==4.34.1"])
|
|
|
7 |
|
8 |
import logging
|
9 |
from pathlib import Path
|
|
|
13 |
from jinja2 import Environment, FileSystemLoader
|
14 |
|
15 |
from backend.query_llm import generate_hf, generate_openai
|
16 |
+
# from backend.semantic_search import table, retriever
|
17 |
|
18 |
VECTOR_COLUMN_NAME = ""
|
19 |
TEXT_COLUMN_NAME = ""
|
gradio_app/requirements.txt → requirements.txt
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
wikiextractor==3.0.6
|
3 |
sentence-transformers>2.2.0
|
4 |
ipywidgets==8.1.1
|
@@ -7,3 +7,4 @@ aiohttp==3.8.6
|
|
7 |
huggingface-hub==0.17.3
|
8 |
lancedb>=0.3
|
9 |
openai==0.28
|
|
|
|
1 |
+
transformers[torch,sentencepiece]==4.34.1
|
2 |
wikiextractor==3.0.6
|
3 |
sentence-transformers>2.2.0
|
4 |
ipywidgets==8.1.1
|
|
|
7 |
huggingface-hub==0.17.3
|
8 |
lancedb>=0.3
|
9 |
openai==0.28
|
10 |
+
gradio==4.4.1
|