pratik-aivantage commited on
Commit
cce5c46
·
verified ·
1 Parent(s): a9c1c8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -25,9 +25,9 @@
25
  import gradio as gr
26
  from transformers import AutoModelForCausalLM, AutoTokenizer
27
 
28
- model_name = "mistralai/Mistral-7B-v0.1"
29
- model = AutoModelForCausalLM.from_pretrained(model_name)
30
- tokenizer = AutoTokenizer.from_pretrained(model_name)
31
 
32
  def generate_answer(question):
33
  inputs = tokenizer.encode("Question: " + question, return_tensors="pt")
 
25
  import gradio as gr
26
  from transformers import AutoModelForCausalLM, AutoTokenizer
27
 
28
+ model_name = "microsoft/phi-2"
29
+ model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True)
30
+ tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
31
 
32
  def generate_answer(question):
33
  inputs = tokenizer.encode("Question: " + question, return_tensors="pt")