alperugurcan commited on
Commit
bdd933c
1 Parent(s): 42afca8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,9 +2,9 @@ import gradio as gr
2
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
3
  import torch
4
 
5
- # Load model
6
- model = AutoModelForSequenceClassification.from_pretrained("nli_model")
7
- tokenizer = AutoTokenizer.from_pretrained("nli_model")
8
 
9
  def predict(premise, hypothesis):
10
  inputs = tokenizer(premise, hypothesis, return_tensors="pt", truncation=True)
 
2
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
3
  import torch
4
 
5
+ # Load model - xlm-roberta-base'i doğrudan kullanalım
6
+ model = AutoModelForSequenceClassification.from_pretrained("xlm-roberta-base", num_labels=3)
7
+ tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-base")
8
 
9
  def predict(premise, hypothesis):
10
  inputs = tokenizer(premise, hypothesis, return_tensors="pt", truncation=True)