Spaces:
Sleeping
Sleeping
update
Browse files- app.py +6 -2
- requirements.txt +10 -10
app.py
CHANGED
@@ -13,6 +13,9 @@ from llama_index.core import Prompt, Settings, VectorStoreIndex
|
|
13 |
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig, TextStreamer
|
14 |
|
15 |
import gradio as gr
|
|
|
|
|
|
|
16 |
|
17 |
|
18 |
|
@@ -145,7 +148,7 @@ def vistral_chat(cfg, retriever, tokenizer, language_model):
|
|
145 |
# print(20*'---')
|
146 |
|
147 |
|
148 |
-
def
|
149 |
# Configure logging
|
150 |
logging.basicConfig(level=logging.INFO,
|
151 |
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
@@ -183,10 +186,11 @@ def main(config_path):
|
|
183 |
logger.exception("An error occurred: %s", e)
|
184 |
|
185 |
if __name__ == "__main__":
|
|
|
186 |
parser = argparse.ArgumentParser(description='Process some configurations.')
|
187 |
parser.add_argument('--config', type=str, default='config.yaml', help='Path to the configuration file')
|
188 |
args = parser.parse_args()
|
189 |
-
|
190 |
|
191 |
|
192 |
|
|
|
13 |
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig, TextStreamer
|
14 |
|
15 |
import gradio as gr
|
16 |
+
from . import prepare_data
|
17 |
+
from prepare_data import *
|
18 |
+
from prepare_data import main
|
19 |
|
20 |
|
21 |
|
|
|
148 |
# print(20*'---')
|
149 |
|
150 |
|
151 |
+
def main1(config_path):
|
152 |
# Configure logging
|
153 |
logging.basicConfig(level=logging.INFO,
|
154 |
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
|
|
186 |
logger.exception("An error occurred: %s", e)
|
187 |
|
188 |
if __name__ == "__main__":
|
189 |
+
main()
|
190 |
parser = argparse.ArgumentParser(description='Process some configurations.')
|
191 |
parser.add_argument('--config', type=str, default='config.yaml', help='Path to the configuration file')
|
192 |
args = parser.parse_args()
|
193 |
+
main1(args.config)
|
194 |
|
195 |
|
196 |
|
requirements.txt
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
llama-index
|
2 |
-
mammoth
|
3 |
-
python-docx
|
4 |
-
docx2txt
|
5 |
-
langchain-community
|
6 |
-
sentence-transformers
|
7 |
-
accelerate
|
8 |
-
bitsandbytes
|
9 |
-
langchain-huggingface
|
10 |
-
jsonargparse
|
11 |
llama-index-embeddings-langchain
|
12 |
gradio
|
|
|
1 |
+
llama-index
|
2 |
+
mammoth
|
3 |
+
python-docx
|
4 |
+
docx2txt
|
5 |
+
langchain-community
|
6 |
+
sentence-transformers
|
7 |
+
accelerate
|
8 |
+
bitsandbytes
|
9 |
+
langchain-huggingface
|
10 |
+
jsonargparse
|
11 |
llama-index-embeddings-langchain
|
12 |
gradio
|