Update app.py
Browse files
app.py
CHANGED
@@ -35,6 +35,7 @@ model_topic.resize_token_embeddings(len(tokenizer_topic))
|
|
35 |
def sentiment(sent: str):
|
36 |
print("\n--------------------------------------------------------------------------------------------------------------------------\n")
|
37 |
print("New review inference at: ", datetime.utcnow())
|
|
|
38 |
print("\n--------------------------------------------------------------------------------------------------------------------------\n")
|
39 |
sent_ = normalize(text=sent)
|
40 |
input_sent = torch.tensor([tokenizer_sent.encode(sent_)]).to(device)
|
@@ -75,6 +76,7 @@ label2id = {v: k for k, v in id2label.items()}
|
|
75 |
def pred_resume(pdf_path) -> dict:
|
76 |
print("\n--------------------------------------------------------------------------------------------------------------------------\n")
|
77 |
print("New resume inference at: ", datetime.utcnow())
|
|
|
78 |
print("\n--------------------------------------------------------------------------------------------------------------------------\n")
|
79 |
global key_list, device
|
80 |
result = {}
|
|
|
35 |
def sentiment(sent: str):
|
36 |
print("\n--------------------------------------------------------------------------------------------------------------------------\n")
|
37 |
print("New review inference at: ", datetime.utcnow())
|
38 |
+
print("review: ", sent)
|
39 |
print("\n--------------------------------------------------------------------------------------------------------------------------\n")
|
40 |
sent_ = normalize(text=sent)
|
41 |
input_sent = torch.tensor([tokenizer_sent.encode(sent_)]).to(device)
|
|
|
76 |
def pred_resume(pdf_path) -> dict:
|
77 |
print("\n--------------------------------------------------------------------------------------------------------------------------\n")
|
78 |
print("New resume inference at: ", datetime.utcnow())
|
79 |
+
print("Pdf name: ", pdf_path.name)
|
80 |
print("\n--------------------------------------------------------------------------------------------------------------------------\n")
|
81 |
global key_list, device
|
82 |
result = {}
|