File size: 868 Bytes
5b2de76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from handler import EndpointHandler
from huggingface_hub import login
from transformers import AutoTokenizer, AutoModel
import os

# LOGIN TO HUGGINGFACE TO UNLOCK STREAM
login("")

handler = EndpointHandler('bie-nhd/visobert-multitask')

print(handler({'task': 'topic', 'text': 'Thầy cô cho em hỏi đăng ký học ghép môn Kinh tế vi mô ở đâu ạ? Em cảm ơn. ⭐'}))
print(handler({'task': 'all', 'text': 'Thầy cô trường này bị sao ấy??? Học kỳ trước em đăng ký học 2 môn online, giờ học kỳ này vào đăng ký học lại thì bị khóa tài khoản không cho đăng ký học nữa. Em phải làm sao ạ???'}))

# # tokenizer = AutoTokenizer.from_pretrained('bie-nhd/visobert-multitask')
# config = AutoConfig.from_pretrained('bie-nhd/visobert-multitask')
# print(f"PATH: {os.path}")
# print(f"CONFIG: {config}")