Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -3,11 +3,19 @@ from fastapi import FastAPI, Form
|
|
| 3 |
from pydantic import BaseModel
|
| 4 |
|
| 5 |
#Model loading
|
| 6 |
-
|
| 7 |
model_type='mistral',
|
| 8 |
max_new_tokens = 1096,
|
| 9 |
threads = 3,
|
| 10 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
|
| 13 |
#Pydantic object
|
|
|
|
| 3 |
from pydantic import BaseModel
|
| 4 |
|
| 5 |
#Model loading
|
| 6 |
+
llm1 = AutoModelForCausalLM.from_pretrained("zephyr-7b-beta.Q4_K_S.gguf",
|
| 7 |
model_type='mistral',
|
| 8 |
max_new_tokens = 1096,
|
| 9 |
threads = 3,
|
| 10 |
)
|
| 11 |
+
|
| 12 |
+
llm = AutoModelForCausalLM.from_pretrained("TheBloke/CodeLlama-7B-Instruct-GGUF",
|
| 13 |
+
model_file="codellama-7b-instruct.q4_K_M.gguf",
|
| 14 |
+
model_type="codellama",
|
| 15 |
+
gpu_layers=0)
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
|
| 19 |
|
| 20 |
|
| 21 |
#Pydantic object
|