AhmedSSabir
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -84,7 +84,7 @@ def get_sim(x):
|
|
84 |
|
85 |
#model.eval()
|
86 |
#tokenizer = gr.Interface.load('huggingface/distilgpt2')
|
87 |
-
|
88 |
#tokenizer = GPT2Tokenizer.from_pretrained('distilgpt2')
|
89 |
tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
|
90 |
#tokenizer = GPT2Tokenizer.from_pretrained('distilgpt2')
|
|
|
84 |
|
85 |
#model.eval()
|
86 |
#tokenizer = gr.Interface.load('huggingface/distilgpt2')
|
87 |
+
device = "mps" if torch.has_mps else "cpu"
|
88 |
#tokenizer = GPT2Tokenizer.from_pretrained('distilgpt2')
|
89 |
tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
|
90 |
#tokenizer = GPT2Tokenizer.from_pretrained('distilgpt2')
|