Wonder-Griffin commited on
Commit
d54b3a1
·
verified ·
1 Parent(s): b86af36

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import gradio as gr
2
- from transformers import GPTForCasualLM, AutoTokenizer, pipeline
3
 
4
  # Use a pipeline as a high-level helper for text generation
5
  pipe = pipeline("text-classification", model="Wonder-Griffin/JudgeLLM2")
@@ -8,7 +8,7 @@ pipe = pipeline("text-classification", model="Wonder-Griffin/JudgeLLM2")
8
  model_path = "Wonder-Griffin/JudgeLLM2" # Define this as needed
9
 
10
  tokenizer = AutoTokenizer.from_pretrained(model_path)
11
- model = GPTForCasualLM.from_pretrained(
12
  model_path,
13
  device_map="auto",
14
  torch_dtype='auto'
 
1
  import gradio as gr
2
+ from transformers import AutoModelForCasualLM, AutoTokenizer, pipeline
3
 
4
  # Use a pipeline as a high-level helper for text generation
5
  pipe = pipeline("text-classification", model="Wonder-Griffin/JudgeLLM2")
 
8
  model_path = "Wonder-Griffin/JudgeLLM2" # Define this as needed
9
 
10
  tokenizer = AutoTokenizer.from_pretrained(model_path)
11
+ model = AutoModelForCasualLM.from_pretrained(
12
  model_path,
13
  device_map="auto",
14
  torch_dtype='auto'