Wonder-Griffin commited on
Commit
0f9509e
·
verified ·
1 Parent(s): 05e9c4a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,14 +1,14 @@
1
  import gradio as gr
2
- from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
3
 
4
  # Use a pipeline as a high-level helper for text generation
5
- pipe = pipeline("text-generation", model="Wonder-Griffin/TraXLMistral")
6
 
7
  # Assuming `model_path` is the Hugging Face model hub path or a local directory
8
- model_path = "Wonder-Griffin/TraXLMistral" # Define this as needed
9
 
10
  tokenizer = AutoTokenizer.from_pretrained(model_path)
11
- model = AutoModelForCausalLM.from_pretrained(
12
  model_path,
13
  device_map="auto",
14
  torch_dtype='auto'
 
1
  import gradio as gr
2
+ from transformers import GPTForCausalLM, AutoTokenizer, pipeline
3
 
4
  # Use a pipeline as a high-level helper for text generation
5
+ pipe = pipeline("text-classification", model="Wonder-Griffin/JudgeLLM2")
6
 
7
  # Assuming `model_path` is the Hugging Face model hub path or a local directory
8
+ model_path = "Wonder-Griffin/JudgeLLM2" # Define this as needed
9
 
10
  tokenizer = AutoTokenizer.from_pretrained(model_path)
11
+ model = GPTForCausalLM.from_pretrained(
12
  model_path,
13
  device_map="auto",
14
  torch_dtype='auto'