Spaces:
Runtime error
Runtime error
ceaserbutdumb
commited on
Commit
·
873626b
1
Parent(s):
06a266b
auth
Browse files- app.py +9 -1
- requirements.txt +2 -1
app.py
CHANGED
@@ -1,6 +1,14 @@
|
|
1 |
from peft import PeftModel, PeftConfig
|
2 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
3 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
config = PeftConfig.from_pretrained("pranjalpandey/gemma-open-instruct")
|
6 |
model = AutoModelForCausalLM.from_pretrained("google/gemma-2b")
|
|
|
1 |
from peft import PeftModel, PeftConfig
|
2 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, whoami
|
3 |
import gradio as gr
|
4 |
+
from dotenv import load_dotenv
|
5 |
+
import os
|
6 |
+
|
7 |
+
|
8 |
+
load_dotenv()
|
9 |
+
HF_TOKEN = os.getenv("HF_TOKEN")
|
10 |
+
|
11 |
+
whoami(token=HF_TOKEN)
|
12 |
|
13 |
config = PeftConfig.from_pretrained("pranjalpandey/gemma-open-instruct")
|
14 |
model = AutoModelForCausalLM.from_pretrained("google/gemma-2b")
|
requirements.txt
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
peft
|
2 |
accelerate
|
3 |
transformers
|
4 |
-
gradio
|
|
|
|
1 |
peft
|
2 |
accelerate
|
3 |
transformers
|
4 |
+
gradio
|
5 |
+
python-dotenv
|