muchuan-l commited on
Commit
81264d0
·
verified ·
1 Parent(s): 7e89cd0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -1,9 +1,15 @@
1
  import gradio as gr
 
2
  from llama_cpp import Llama
3
 
4
- # 加载 GGUF 模型
5
- model_path = "muchuan-l/qwen2.5math1.5b-2v2-rev/blob/main/unsloth.Q4_K_M.gguf"
 
 
 
 
6
 
 
7
  llm = Llama(
8
  model_path=model_path,
9
  n_ctx=2048, # 上下文长度
 
1
  import gradio as gr
2
+ from huggingface_hub import hf_hub_download
3
  from llama_cpp import Llama
4
 
5
+ # 下载模型文件
6
+ model_path = hf_hub_download(
7
+ repo_id="muchuan-l/qwen2.5math1.5b-2v2-rev", # 模型仓库 ID
8
+ filename="unsloth.Q4_K_M.gguf", # 模型文件名
9
+ cache_dir="." # 下载到当前目录
10
+ )
11
 
12
+ # 加载 GGUF 模型
13
  llm = Llama(
14
  model_path=model_path,
15
  n_ctx=2048, # 上下文长度