Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,16 @@ import os
|
|
| 4 |
import subprocess
|
| 5 |
import torch
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# ---------- STEP 1: Fine-tuned 모델 Git에서 clone ----------
|
| 8 |
repo_url = "DMID23/MachineToolAgent"
|
| 9 |
|
|
|
|
| 4 |
import subprocess
|
| 5 |
import torch
|
| 6 |
|
| 7 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 8 |
+
from huggingface_hub import login
|
| 9 |
+
|
| 10 |
+
login("your_hf_token_here")
|
| 11 |
+
|
| 12 |
+
base_model = "mistralai/Mistral-7B-Instruct-v0.1"
|
| 13 |
+
|
| 14 |
+
tokenizer = AutoTokenizer.from_pretrained(base_model, use_auth_token=True)
|
| 15 |
+
model = AutoModelForCausalLM.from_pretrained(base_model, torch_dtype="auto", use_auth_token=True)
|
| 16 |
+
|
| 17 |
# ---------- STEP 1: Fine-tuned 모델 Git에서 clone ----------
|
| 18 |
repo_url = "DMID23/MachineToolAgent"
|
| 19 |
|