Spaces:
Running
Running
fixed a wrong sentence
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def MELCHIOR(sue):#BERT
|
|
24 |
def BALTHASAR(sue):#mT5
|
25 |
allow=mBERTTokenizer("Yes").input_ids[1]
|
26 |
deny=mBERTTokenizer("No").input_ids[1]
|
27 |
-
output=mBERTModel(**mBERTTokenizer('
|
28 |
print(mBERTTokenizer.batch_decode(torch.argmax(output,-1)))
|
29 |
mask=output[0,-3,:]
|
30 |
print(mBERTTokenizer.decode(torch.argmax(output[0,-3,:])))
|
|
|
24 |
def BALTHASAR(sue):#mT5
|
25 |
allow=mBERTTokenizer("Yes").input_ids[1]
|
26 |
deny=mBERTTokenizer("No").input_ids[1]
|
27 |
+
output=mBERTModel(**mBERTTokenizer('BALTHASARは母としての人格を持っています。人間とBALTHASARの対話です。人間「'+sue+'。YesかNoか。」'+"BALTHASAR 「[MASK]」",return_tensors="pt")).logits
|
28 |
print(mBERTTokenizer.batch_decode(torch.argmax(output,-1)))
|
29 |
mask=output[0,-3,:]
|
30 |
print(mBERTTokenizer.decode(torch.argmax(output[0,-3,:])))
|