sapthesh commited on
Commit
de53c31
·
verified ·
1 Parent(s): 2ce40b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,10 +1,12 @@
1
  import gradio as gr
2
- from transformers import AutoModelForSequenceClassification, AutoTokenizer
 
 
3
 
4
- # Load the model and tokenizer
5
  model_name = "deepseek-ai/DeepSeek-V3"
6
  tokenizer = AutoTokenizer.from_pretrained(model_name)
7
- model = AutoModelForSequenceClassification.from_pretrained(model_name, trust_remote_code=True)
8
 
9
  def classify_text(text):
10
  inputs = tokenizer(text, return_tensors="pt")
 
1
  import gradio as gr
2
+ from transformers import AutoTokenizer, PreTrainedTokenizer
3
+ import torch
4
+ from custom_model import CustomModel
5
 
6
+ # Load the tokenizer and custom model
7
  model_name = "deepseek-ai/DeepSeek-V3"
8
  tokenizer = AutoTokenizer.from_pretrained(model_name)
9
+ model = CustomModel.from_pretrained(model_name)
10
 
11
  def classify_text(text):
12
  inputs = tokenizer(text, return_tensors="pt")