Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,15 +8,14 @@ import os
|
|
8 |
|
9 |
load_dotenv()
|
10 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
11 |
-
login()
|
12 |
|
13 |
# whoami(token=HF_TOKEN)
|
14 |
|
15 |
config = PeftConfig.from_pretrained("pranjalpandey/gemma-open-instruct")
|
16 |
-
model = AutoModelForCausalLM.from_pretrained("google/gemma-2b")
|
17 |
model = PeftModel.from_pretrained(model, "pranjalpandey/gemma-open-instruct")
|
18 |
# model = AutoPeftModelForCausalLM.from_pretrained("pranjalpandey/llama-7b-finetuned-dialogue-summarizer")
|
19 |
-
tokenizer = AutoTokenizer.from_pretrained("pranjalpandey/gemma-open-instruct")
|
20 |
model = model.to("cuda")
|
21 |
|
22 |
def response(prompt):
|
|
|
8 |
|
9 |
load_dotenv()
|
10 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
|
|
11 |
|
12 |
# whoami(token=HF_TOKEN)
|
13 |
|
14 |
config = PeftConfig.from_pretrained("pranjalpandey/gemma-open-instruct")
|
15 |
+
model = AutoModelForCausalLM.from_pretrained("google/gemma-2b", token=HF_TOKEN)
|
16 |
model = PeftModel.from_pretrained(model, "pranjalpandey/gemma-open-instruct")
|
17 |
# model = AutoPeftModelForCausalLM.from_pretrained("pranjalpandey/llama-7b-finetuned-dialogue-summarizer")
|
18 |
+
tokenizer = AutoTokenizer.from_pretrained("pranjalpandey/gemma-open-instruct", token=HF_TOKEN)
|
19 |
model = model.to("cuda")
|
20 |
|
21 |
def response(prompt):
|