Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,25 +1,10 @@
|
|
| 1 |
import os
|
| 2 |
import tempfile
|
| 3 |
import subprocess
|
| 4 |
-
from transformers import AutoConfig
|
| 5 |
from huggingface_hub import login, HfApi
|
| 6 |
|
| 7 |
REPO_NAME = "Andrewstivan/AURA"
|
| 8 |
|
| 9 |
-
# Проверка моделей
|
| 10 |
-
print("Checking models...")
|
| 11 |
-
try:
|
| 12 |
-
config1 = AutoConfig.from_pretrained("ResplendentAI/Aura_v3_7B", trust_remote_code=True)
|
| 13 |
-
print(f"Aura_v3_7B architectures: {config1.architectures}")
|
| 14 |
-
except Exception as e:
|
| 15 |
-
print(f"Aura_v3_7B error: {e}")
|
| 16 |
-
|
| 17 |
-
try:
|
| 18 |
-
config2 = AutoConfig.from_pretrained("IlyaGusev/saiga_mistral_7b", trust_remote_code=True)
|
| 19 |
-
print(f"Saiga architectures: {config2.architectures}")
|
| 20 |
-
except Exception as e:
|
| 21 |
-
print(f"Saiga error: {e}")
|
| 22 |
-
|
| 23 |
YAML_CONFIG = """models:
|
| 24 |
- model: ResplendentAI/Aura_v3_7B
|
| 25 |
parameters:
|
|
@@ -53,7 +38,6 @@ with tempfile.TemporaryDirectory() as tmpdir:
|
|
| 53 |
|
| 54 |
if process.returncode == 0:
|
| 55 |
print("Merge complete! Uploading...")
|
| 56 |
-
login(token=os.getenv("HF_TOKEN"))
|
| 57 |
api = HfApi()
|
| 58 |
api.create_repo(REPO_NAME, exist_ok=True)
|
| 59 |
api.upload_folder(folder_path=merged_path, repo_id=REPO_NAME, repo_type="model")
|
|
|
|
| 1 |
import os
|
| 2 |
import tempfile
|
| 3 |
import subprocess
|
|
|
|
| 4 |
from huggingface_hub import login, HfApi
|
| 5 |
|
| 6 |
REPO_NAME = "Andrewstivan/AURA"
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
YAML_CONFIG = """models:
|
| 9 |
- model: ResplendentAI/Aura_v3_7B
|
| 10 |
parameters:
|
|
|
|
| 38 |
|
| 39 |
if process.returncode == 0:
|
| 40 |
print("Merge complete! Uploading...")
|
|
|
|
| 41 |
api = HfApi()
|
| 42 |
api.create_repo(REPO_NAME, exist_ok=True)
|
| 43 |
api.upload_folder(folder_path=merged_path, repo_id=REPO_NAME, repo_type="model")
|