lunadebruyne commited on
Commit
908e0d4
·
1 Parent(s): 747fda3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -83,7 +83,6 @@ def inference_dataset(file_object):
83
  """
84
 
85
  def inference_dataset(file_object, option_list, progress=gr.Progress()):
86
- progress(0, desc="Starting...")
87
  tokenizer = AutoTokenizer.from_pretrained(inference_modelpath)
88
  model = AutoModelForSequenceClassification.from_pretrained(inference_modelpath)
89
  data_path = open(file_object.name, 'r')
@@ -91,6 +90,7 @@ def inference_dataset(file_object, option_list, progress=gr.Progress()):
91
  ids = df["id"].tolist()
92
  texts = df["text"].tolist()
93
  preds = []
 
94
  for text in tqdm(texts): # progressbar
95
  inputs = tokenizer(text, return_tensors="pt")
96
  with torch.no_grad(): # run model
 
83
  """
84
 
85
  def inference_dataset(file_object, option_list, progress=gr.Progress()):
 
86
  tokenizer = AutoTokenizer.from_pretrained(inference_modelpath)
87
  model = AutoModelForSequenceClassification.from_pretrained(inference_modelpath)
88
  data_path = open(file_object.name, 'r')
 
90
  ids = df["id"].tolist()
91
  texts = df["text"].tolist()
92
  preds = []
93
+ progress(0, desc="Starting...")
94
  for text in tqdm(texts): # progressbar
95
  inputs = tokenizer(text, return_tensors="pt")
96
  with torch.no_grad(): # run model