Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
from transformers import GPT2LMHeadModel, GPT2Tokenizer
|
|
|
4 |
|
5 |
|
6 |
def generate(text, model, tokenizer,device,do_sample,top_k=100, epsilon_cutoff=.00005, temperature=1):
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
from transformers import GPT2LMHeadModel, GPT2Tokenizer
|
4 |
+
import torch
|
5 |
|
6 |
|
7 |
def generate(text, model, tokenizer,device,do_sample,top_k=100, epsilon_cutoff=.00005, temperature=1):
|