usmanyousaf commited on
Commit
7158965
·
verified ·
1 Parent(s): af46838

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -9,7 +9,10 @@ import io, tempfile, os, re
9
  st.set_page_config(page_title="PPTX Smart Enhancer", layout="wide")
10
 
11
  # Load your hosted Hugging Face model
12
- MODEL_ID = "Faisalkhany/llam1b_finetune" # ← change this
 
 
 
13
  tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
14
  model = AutoModelForCausalLM.from_pretrained(MODEL_ID, device_map="auto", torch_dtype="auto")
15
  pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
 
9
  st.set_page_config(page_title="PPTX Smart Enhancer", layout="wide")
10
 
11
  # Load your hosted Hugging Face model
12
+ from transformers import LlamaForCausalLM
13
+
14
+ model = LlamaForCausalLM.from_pretrained("Faisalkhany/llam1b_finetune")
15
+ # ← change this
16
  tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
17
  model = AutoModelForCausalLM.from_pretrained(MODEL_ID, device_map="auto", torch_dtype="auto")
18
  pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)