Jaamie commited on
Commit
01d1485
·
verified ·
1 Parent(s): d30ff12

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -158,7 +158,8 @@ emotion_classifier = hf_pipeline("text-classification", model="nateraw/bert-base
158
 
159
  device = 0 if torch.cuda.is_available() else -1
160
  tokenizer = AutoTokenizer.from_pretrained(READER_MODEL_NAME)
161
- model = AutoModelForCausalLM.from_pretrained(READER_MODEL_NAME).to(device)
 
162
  READER_LLM = pipeline(
163
  model=model,
164
  tokenizer=tokenizer,
@@ -168,7 +169,7 @@ READER_LLM = pipeline(
168
  repetition_penalty=1.1,
169
  return_full_text=False,
170
  max_new_tokens=500,
171
- device=device,
172
  )
173
  # -------------------------------
174
  # 🔧 Whisper Model Setup
 
158
 
159
  device = 0 if torch.cuda.is_available() else -1
160
  tokenizer = AutoTokenizer.from_pretrained(READER_MODEL_NAME)
161
+ model = AutoModelForCausalLM.from_pretrained(READER_MODEL_NAME)
162
+ #model = AutoModelForCausalLM.from_pretrained(READER_MODEL_NAME).to(device)
163
  READER_LLM = pipeline(
164
  model=model,
165
  tokenizer=tokenizer,
 
169
  repetition_penalty=1.1,
170
  return_full_text=False,
171
  max_new_tokens=500,
172
+ # device=device,
173
  )
174
  # -------------------------------
175
  # 🔧 Whisper Model Setup