Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,8 +12,8 @@ MODEL_ID = "guangyangmusic/legato-small"
|
|
| 12 |
|
| 13 |
print("正在从 Hugging Face 缓存加载 LEGATO OMR 模型...")
|
| 14 |
# 使用 token 参数来确保有权下载该模型
|
| 15 |
-
processor = AutoProcessor.from_pretrained(MODEL_ID, token=
|
| 16 |
-
model = VisionEncoderDecoderModel.from_pretrained(MODEL_ID, token=
|
| 17 |
print("模型加载成功!")
|
| 18 |
|
| 19 |
def run_legato_omr(image):
|
|
|
|
| 12 |
|
| 13 |
print("正在从 Hugging Face 缓存加载 LEGATO OMR 模型...")
|
| 14 |
# 使用 token 参数来确保有权下载该模型
|
| 15 |
+
processor = AutoProcessor.from_pretrained(MODEL_ID, token=hf_token)
|
| 16 |
+
model = VisionEncoderDecoderModel.from_pretrained(MODEL_ID, token=hf_token)
|
| 17 |
print("模型加载成功!")
|
| 18 |
|
| 19 |
def run_legato_omr(image):
|