Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from peft import PeftModel, PeftConfig
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
4 |
import torch
|
5 |
import re
|
6 |
import os
|
@@ -9,6 +10,7 @@ model_name = "google/gemma-2b"
|
|
9 |
peft_model = "kazuma313/gemma-dokter-ft"
|
10 |
device_map = "auto"
|
11 |
hf_token = os.getenv('hftoken')
|
|
|
12 |
|
13 |
config = PeftConfig.from_pretrained(peft_model)
|
14 |
|
|
|
1 |
import gradio as gr
|
2 |
from peft import PeftModel, PeftConfig
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
4 |
+
from huggingface_hub import login
|
5 |
import torch
|
6 |
import re
|
7 |
import os
|
|
|
10 |
peft_model = "kazuma313/gemma-dokter-ft"
|
11 |
device_map = "auto"
|
12 |
hf_token = os.getenv('hftoken')
|
13 |
+
login(token=hf_token)
|
14 |
|
15 |
config = PeftConfig.from_pretrained(peft_model)
|
16 |
|