Dunateo commited on
Commit
e626fb9
·
1 Parent(s): 0517bb5

fix pb with label dict

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -4,7 +4,8 @@ from huggingface_hub import hf_hub_download
4
  import torch
5
  import json
6
 
7
- label_dict = ''
 
8
 
9
  def predict(text):
10
  inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=512)
 
4
  import torch
5
  import json
6
 
7
+ global label_dict
8
+ label_dict = {}
9
 
10
  def predict(text):
11
  inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=512)