Spaces:
Sleeping
Sleeping
tomas.helmfridsson
commited on
Commit
·
4416daf
1
Parent(s):
e3c45d8
LLM_MODEL datificate/gpt2-small-swedish
Browse files
app.py
CHANGED
@@ -11,11 +11,11 @@ from langchain.text_splitter import RecursiveCharacterTextSplitter
|
|
11 |
DOCS_DIR = "document"
|
12 |
INDEX_DIR = "faiss_index"
|
13 |
EMB_MODEL = "KBLab/sentence-bert-swedish-cased"
|
14 |
-
#LLM_MODEL = "tiiuae/falcon-rw-1b"
|
15 |
-
#LLM_MODEL = "google/flan-t5-base"
|
16 |
-
#LLM_MODEL = "bigscience/bloom-560m"
|
17 |
-
LLM_MODEL = "NbAiLab/nb-gpt-j-6B"
|
18 |
-
|
19 |
|
20 |
CHUNK_SIZE = 400
|
21 |
CHUNK_OVERLAP = 40
|
@@ -115,6 +115,7 @@ def chat_fn(q, temp, history):
|
|
115 |
with gr.Blocks() as demo:
|
116 |
gr.Markdown("# 📚 Svensk RAG‑chat")
|
117 |
gr.Markdown(f"**PDF‑filer:** {', '.join(os.listdir(DOCS_DIR)) or '–'}")
|
|
|
118 |
|
119 |
with gr.Row():
|
120 |
q_test = gr.Textbox(label="🔎 Test Retrieval")
|
|
|
11 |
DOCS_DIR = "document"
|
12 |
INDEX_DIR = "faiss_index"
|
13 |
EMB_MODEL = "KBLab/sentence-bert-swedish-cased"
|
14 |
+
#LLM_MODEL = "tiiuae/falcon-rw-1b" # Dålig
|
15 |
+
#LLM_MODEL = "google/flan-t5-base" # Dålig
|
16 |
+
#LLM_MODEL = "bigscience/bloom-560m" # Dålig
|
17 |
+
#LLM_MODEL = "NbAiLab/nb-gpt-j-6B" #- Restricted
|
18 |
+
LLM_MODEL = "datificate/gpt2-small-swedish"
|
19 |
|
20 |
CHUNK_SIZE = 400
|
21 |
CHUNK_OVERLAP = 40
|
|
|
115 |
with gr.Blocks() as demo:
|
116 |
gr.Markdown("# 📚 Svensk RAG‑chat")
|
117 |
gr.Markdown(f"**PDF‑filer:** {', '.join(os.listdir(DOCS_DIR)) or '–'}")
|
118 |
+
gr.Markdown(f"**LLM-modell som används:** `{LLM_MODEL}`", elem_id="llm-info")
|
119 |
|
120 |
with gr.Row():
|
121 |
q_test = gr.Textbox(label="🔎 Test Retrieval")
|