oki602960 commited on
Commit
acb978d
·
verified ·
1 Parent(s): 990972e

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -32
app.py DELETED
@@ -1,32 +0,0 @@
1
- import os
2
- from llama_cpp.server.app import create_app
3
- from llama_cpp.server.settings import Settings
4
- from huggingface_hub import hf_hub_download
5
-
6
- # Configuration for the model
7
- REPO_ID = "speakleash/Bielik-7B-Instruct-v0.1-GGUF"
8
- FILENAME = "bielik-7b-instruct-v0.1.Q2_K.gguf"
9
-
10
- def get_model():
11
- print(f"Downloading model {FILENAME} from {REPO_ID}...")
12
- model_path = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
13
- return model_path
14
-
15
- if __name__ == "__main__":
16
- model_path = get_model()
17
-
18
- # Set up settings for llama-cpp-python server
19
- # We use environment variables or direct settings
20
- settings = Settings(
21
- model=model_path,
22
- n_ctx=4096,
23
- n_gpu_layers=0, # HF Spaces CPU usually, set to 0 or use environment to detect
24
- host="0.0.0.0",
25
- port=7860,
26
- interrupt_requests=True,
27
- )
28
-
29
- app = create_app(settings=settings)
30
-
31
- import uvicorn
32
- uvicorn.run(app, host="0.0.0.0", port=7860)