cheberle commited on
Commit
f3d041b
·
1 Parent(s): b0e6d60
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 AutoTokenizer, AutoModelForSequenceClassification
3
 
4
- # Load the model and tokenizer
5
  model_name = "deepseek-ai/DeepSeek-R1"
6
- tokenizer = AutoTokenizer.from_pretrained(model_name)
7
- model = AutoModelForSequenceClassification.from_pretrained(model_name)
8
 
9
  def classify_text(input_text):
10
  # Tokenize the input
 
1
  import gradio as gr
2
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
3
 
4
+ # Load the model and tokenizer with `trust_remote_code=True`
5
  model_name = "deepseek-ai/DeepSeek-R1"
6
+ tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
7
+ model = AutoModelForSequenceClassification.from_pretrained(model_name, trust_remote_code=True)
8
 
9
  def classify_text(input_text):
10
  # Tokenize the input