Spaces:
Sleeping
Sleeping
RandomNameAnd6
commited on
Commit
•
f9ba630
1
Parent(s):
46d4631
Update app.py
Browse files
app.py
CHANGED
@@ -5,8 +5,8 @@ import gradio as gr
|
|
5 |
import torch
|
6 |
from transformers import GPT2Tokenizer, GPT2LMHeadModel
|
7 |
|
8 |
-
tokenizer = GPT2Tokenizer.from_pretrained("RandomNameAnd6/DharGPT-Tokenizer")
|
9 |
-
model = GPT2LMHeadModel.from_pretrained("RandomNameAnd6/DharGPT").eval()
|
10 |
|
11 |
def generate_text(prompt):
|
12 |
input_ids = tokenizer.encode(prompt, return_tensors="pt")
|
|
|
5 |
import torch
|
6 |
from transformers import GPT2Tokenizer, GPT2LMHeadModel
|
7 |
|
8 |
+
tokenizer = GPT2Tokenizer.from_pretrained("RandomNameAnd6/DharGPT-GPT2-Tokenizer")
|
9 |
+
model = GPT2LMHeadModel.from_pretrained("RandomNameAnd6/DharGPT-GPT2").eval()
|
10 |
|
11 |
def generate_text(prompt):
|
12 |
input_ids = tokenizer.encode(prompt, return_tensors="pt")
|