Wh1plashR commited on
Commit
ad27687
Β·
verified Β·
1 Parent(s): b6b99da

changed to mistral

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -1,11 +1,10 @@
1
  import gradio as gr
2
- from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
3
  import torch
4
 
5
- # Load the pre-trained model and tokenizer
6
- model_name = "google/flan-t5-base"
7
- tokenizer = AutoTokenizer.from_pretrained(model_name)
8
- model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
9
  model = torch.compile(model)
10
 
11
  prompt_prefix = """
 
1
  import gradio as gr
2
+ from transformers import AutoModelForCausalLM, AutoTokenizer
3
  import torch
4
 
5
+ # ── Choose the Mistral‑7B‑Instruct checkpoint ───────────────────────────────────
6
+ model_name = "mistralai/Mistral-7B-Instruct-v0.1"
7
+ model = AutoModelForCausalLM.from_pretrained(model_name)
 
8
  model = torch.compile(model)
9
 
10
  prompt_prefix = """