Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,6 +13,12 @@ import gradio as gr
|
|
| 13 |
from llama_cpp import Llama
|
| 14 |
from huggingface_hub import hf_hub_download
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
MODEL_REPO = "TheBloke/TinyLlama-1.1B-Chat-GGUF"
|
| 17 |
GGUF_FILE = "tinyllama-1.1b-chat.q4_K_M.gguf" # 2 GB, 4-bit
|
| 18 |
N_CTX = 4096 # tokens of context
|
|
|
|
| 13 |
from llama_cpp import Llama
|
| 14 |
from huggingface_hub import hf_hub_download
|
| 15 |
|
| 16 |
+
from fastapi.staticfiles import StaticFiles
|
| 17 |
+
app = FastAPI()
|
| 18 |
+
app.mount("/static", StaticFiles(directory="static"), name="static")
|
| 19 |
+
# keep the next line so Gradio UI is still available at /
|
| 20 |
+
app = gr.mount_gradio_app(app, demo, path="/")
|
| 21 |
+
|
| 22 |
MODEL_REPO = "TheBloke/TinyLlama-1.1B-Chat-GGUF"
|
| 23 |
GGUF_FILE = "tinyllama-1.1b-chat.q4_K_M.gguf" # 2 GB, 4-bit
|
| 24 |
N_CTX = 4096 # tokens of context
|