Update app.py
Browse files
app.py
CHANGED
|
@@ -21,8 +21,7 @@ async def completion(request: Request):
|
|
| 21 |
echo=False,
|
| 22 |
max_tokens=32,
|
| 23 |
)
|
| 24 |
-
|
| 25 |
-
print(total)
|
| 26 |
return {"responses": res["choices"]}
|
| 27 |
except Exception as j:
|
| 28 |
print(j)
|
|
@@ -34,9 +33,8 @@ if __name__ == "__main__":
|
|
| 34 |
|
| 35 |
hf_hub_download("TheBloke/deepseek-coder-1.3b-base-GGUF", "deepseek-coder-1.3b-base.Q5_K_M.gguf", local_dir="./")
|
| 36 |
global model_l
|
| 37 |
-
|
| 38 |
model_l = Llama(model_path="./deepseek-coder-1.3b-base.Q5_K_M.gguf", n_ctx=16192, n_gpu_layers=0, n_threads=2, use_mlock=True)
|
| 39 |
-
total = 0
|
| 40 |
|
| 41 |
import uvicorn
|
| 42 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|
|
|
|
| 21 |
echo=False,
|
| 22 |
max_tokens=32,
|
| 23 |
)
|
| 24 |
+
|
|
|
|
| 25 |
return {"responses": res["choices"]}
|
| 26 |
except Exception as j:
|
| 27 |
print(j)
|
|
|
|
| 33 |
|
| 34 |
hf_hub_download("TheBloke/deepseek-coder-1.3b-base-GGUF", "deepseek-coder-1.3b-base.Q5_K_M.gguf", local_dir="./")
|
| 35 |
global model_l
|
| 36 |
+
|
| 37 |
model_l = Llama(model_path="./deepseek-coder-1.3b-base.Q5_K_M.gguf", n_ctx=16192, n_gpu_layers=0, n_threads=2, use_mlock=True)
|
|
|
|
| 38 |
|
| 39 |
import uvicorn
|
| 40 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|