Spaces:
Sleeping
Sleeping
Pranjal Gupta
commited on
Commit
·
6c68252
1
Parent(s):
d3935d3
changed the model
Browse files
app.py
CHANGED
|
@@ -60,10 +60,10 @@ def using_ollama_model(retriever, query, results, conversation_history):
|
|
| 60 |
)
|
| 61 |
|
| 62 |
doc_texts = "\\n".join([doc.page_content for doc in results])
|
| 63 |
-
|
| 64 |
# llm = ChatOllama(model="llama3.2", temperature=0.4, num_predict=512)
|
| 65 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
| 66 |
-
model = AutoModelForCausalLM.from_pretrained(
|
| 67 |
pipe = pipeline(
|
| 68 |
"text-generation",
|
| 69 |
model=model,
|
|
|
|
| 60 |
)
|
| 61 |
|
| 62 |
doc_texts = "\\n".join([doc.page_content for doc in results])
|
| 63 |
+
model_id = "meta-llama/Llama-3.2-1B-Instruct" # was llama3.2
|
| 64 |
# llm = ChatOllama(model="llama3.2", temperature=0.4, num_predict=512)
|
| 65 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 66 |
+
model = AutoModelForCausalLM.from_pretrained(model_id)
|
| 67 |
pipe = pipeline(
|
| 68 |
"text-generation",
|
| 69 |
model=model,
|