Spaces:
Runtime error
Runtime error
Update to qwen:1.8b
Browse files- app/rag.py +2 -2
- start_service.sh +1 -1
app/rag.py
CHANGED
@@ -15,7 +15,7 @@ class ChatPDF:
|
|
15 |
chain = None
|
16 |
|
17 |
def __init__(self):
|
18 |
-
self.model = ChatOllama(model="qwen:
|
19 |
self.text_splitter = RecursiveCharacterTextSplitter(chunk_size=2048, chunk_overlap=128)
|
20 |
self.prompt = PromptTemplate.from_template(
|
21 |
"""
|
@@ -37,7 +37,7 @@ class ChatPDF:
|
|
37 |
search_type="similarity_score_threshold",
|
38 |
search_kwargs={
|
39 |
"k": 15,
|
40 |
-
"score_threshold":
|
41 |
},
|
42 |
)
|
43 |
|
|
|
15 |
chain = None
|
16 |
|
17 |
def __init__(self):
|
18 |
+
self.model = ChatOllama(model="qwen:1.8b")
|
19 |
self.text_splitter = RecursiveCharacterTextSplitter(chunk_size=2048, chunk_overlap=128)
|
20 |
self.prompt = PromptTemplate.from_template(
|
21 |
"""
|
|
|
37 |
search_type="similarity_score_threshold",
|
38 |
search_kwargs={
|
39 |
"k": 15,
|
40 |
+
"score_threshold": 0.5,
|
41 |
},
|
42 |
)
|
43 |
|
start_service.sh
CHANGED
@@ -7,7 +7,7 @@ ollama serve &
|
|
7 |
sleep 5
|
8 |
|
9 |
# Pull and run <YOUR_MODEL_NAME>
|
10 |
-
ollama pull qwen:
|
11 |
|
12 |
#
|
13 |
fastapi run /code/app/main.py --port 7860
|
|
|
7 |
sleep 5
|
8 |
|
9 |
# Pull and run <YOUR_MODEL_NAME>
|
10 |
+
ollama pull qwen:1.8b
|
11 |
|
12 |
#
|
13 |
fastapi run /code/app/main.py --port 7860
|