Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -107,10 +107,10 @@ if uploaded_file is not None:
|
|
107 |
|
108 |
input_text =sentance
|
109 |
print(input_text)
|
110 |
-
|
111 |
-
outputs = model_2(**inputs)
|
112 |
-
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
|
113 |
-
predictions = predictions.cpu().detach().numpy()
|
114 |
inputs = tokenizer(input_text, return_tensors="pt")
|
115 |
outputs = model(**inputs)
|
116 |
predictions = outputs.logits.softmax(dim=-1)
|
|
|
107 |
|
108 |
input_text =sentance
|
109 |
print(input_text)
|
110 |
+
#inputs = tokenizer(text,padding = True, truncation = True, return_tensors='pt').to('cpu')
|
111 |
+
#outputs = model_2(**inputs)
|
112 |
+
#predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
|
113 |
+
#predictions = predictions.cpu().detach().numpy()
|
114 |
inputs = tokenizer(input_text, return_tensors="pt")
|
115 |
outputs = model(**inputs)
|
116 |
predictions = outputs.logits.softmax(dim=-1)
|