Update app.py
Browse files
app.py
CHANGED
|
@@ -7,10 +7,13 @@ import os
|
|
| 7 |
import gradio as gr
|
| 8 |
import requests
|
| 9 |
import torch
|
| 10 |
-
from transformers import GPT2Tokenizer, GPT2LMHeadModel
|
| 11 |
from torch.nn.functional import softmax
|
| 12 |
import numpy as np
|
| 13 |
|
|
|
|
|
|
|
|
|
|
| 14 |
# just for the sake of this demo, we use cloze prob to initialize the hypothesis
|
| 15 |
|
| 16 |
#url = "https://github.com/simonepri/lm-scorer/tree/master/lm_scorer/models"
|
|
|
|
| 7 |
import gradio as gr
|
| 8 |
import requests
|
| 9 |
import torch
|
| 10 |
+
#from transformers import GPT2Tokenizer, GPT2LMHeadModel
|
| 11 |
from torch.nn.functional import softmax
|
| 12 |
import numpy as np
|
| 13 |
|
| 14 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 15 |
+
#from torch.nn.functional import softmax
|
| 16 |
+
|
| 17 |
# just for the sake of this demo, we use cloze prob to initialize the hypothesis
|
| 18 |
|
| 19 |
#url = "https://github.com/simonepri/lm-scorer/tree/master/lm_scorer/models"
|