Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -61,10 +61,7 @@ print("Finish the model init process")
|
|
61 |
|
62 |
def qa(question: str) -> str:
|
63 |
|
64 |
-
|
65 |
-
persist_directory="./resource/chroma/",
|
66 |
-
embedding_function=embeddings
|
67 |
-
)
|
68 |
docs = vectordb.max_marginal_relevance_search(question,k=3)
|
69 |
|
70 |
|
@@ -81,7 +78,7 @@ def qa(question: str) -> str:
|
|
81 |
# """
|
82 |
|
83 |
#outputs = model.generate(prompt=prompt, temp=0.5, top_k = 40, top_p = 1, max_tokens = max_new_tokens)
|
84 |
-
return
|
85 |
|
86 |
|
87 |
demo = gr.Interface(
|
|
|
61 |
|
62 |
def qa(question: str) -> str:
|
63 |
|
64 |
+
|
|
|
|
|
|
|
65 |
docs = vectordb.max_marginal_relevance_search(question,k=3)
|
66 |
|
67 |
|
|
|
78 |
# """
|
79 |
|
80 |
#outputs = model.generate(prompt=prompt, temp=0.5, top_k = 40, top_p = 1, max_tokens = max_new_tokens)
|
81 |
+
return vectordb._collection.count() #"".join(outputs)
|
82 |
|
83 |
|
84 |
demo = gr.Interface(
|