Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
@@ -2,6 +2,7 @@ import json # to work with JSON
|
|
2 |
import threading # to allow streaming response
|
3 |
import time # to pave the deliver of the message
|
4 |
|
|
|
5 |
import faiss # to create a search index
|
6 |
import gradio # for the interface
|
7 |
import numpy # to work with vectors
|
@@ -23,7 +24,7 @@ EMBEDDING_MODEL_NAME = "allenai-specter"
|
|
23 |
LLM_MODEL_NAME = "Qwen/Qwen2-7B-Instruct"
|
24 |
|
25 |
# Load the dataset and convert to pandas
|
26 |
-
data =
|
27 |
|
28 |
# Load the model for later use in embeddings
|
29 |
model = sentence_transformers.SentenceTransformer(EMBEDDING_MODEL_NAME)
|
|
|
2 |
import threading # to allow streaming response
|
3 |
import time # to pave the deliver of the message
|
4 |
|
5 |
+
import datasets # for loading RAG database
|
6 |
import faiss # to create a search index
|
7 |
import gradio # for the interface
|
8 |
import numpy # to work with vectors
|
|
|
24 |
LLM_MODEL_NAME = "Qwen/Qwen2-7B-Instruct"
|
25 |
|
26 |
# Load the dataset and convert to pandas
|
27 |
+
data = datasets.load_dataset("ccm/rag-idetc")["train"].to_pandas()
|
28 |
|
29 |
# Load the model for later use in embeddings
|
30 |
model = sentence_transformers.SentenceTransformer(EMBEDDING_MODEL_NAME)
|