research14 commited on
Commit
937be2f
1 Parent(s): dedc54d
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
- from transformers import GPT2LMHeadModel, GPT2Tokenizer
3
 
4
  # Load the Vicuna 7B v1.3 LMSys model and tokenizer
5
  model_name = "lmsys/vicuna-7b-v1.3"
6
- tokenizer = GPT2Tokenizer.from_pretrained(model_name)
7
- model = GPT2LMHeadModel.from_pretrained(model_name, force_download=True)
8
 
9
  with gr.Blocks() as demo:
10
  chatbot = gr.Chatbot()
 
1
  import gradio as gr
2
+ from transformers import AutoTokenizer, AutoModelForCausalLM
3
 
4
  # Load the Vicuna 7B v1.3 LMSys model and tokenizer
5
  model_name = "lmsys/vicuna-7b-v1.3"
6
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
7
+ model = AutoModelForCausalLM.from_pretrained(model_name)
8
 
9
  with gr.Blocks() as demo:
10
  chatbot = gr.Chatbot()