Spaces:
Runtime error
Runtime error
Commit
·
7b10293
1
Parent(s):
2672584
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
13 |
# Define a function for generating text based on a prompt using the fine-tuned GPT-2 model and the tokenizer
|
14 |
def generate_text(prompt, length=100, theme=None, **kwargs):
|
15 |
|
16 |
-
model_name = "sailormars18/Yelp-reviews-usingGPT2"
|
17 |
|
18 |
# Load the model from the Hugging Face space
|
19 |
model = GPT2LMHeadModel.from_pretrained(model_name).to(device)
|
|
|
13 |
# Define a function for generating text based on a prompt using the fine-tuned GPT-2 model and the tokenizer
|
14 |
def generate_text(prompt, length=100, theme=None, **kwargs):
|
15 |
|
16 |
+
model_name = "https://huggingface.co/spaces/sailormars18/Yelp-reviews-usingGPT2/tree/main"
|
17 |
|
18 |
# Load the model from the Hugging Face space
|
19 |
model = GPT2LMHeadModel.from_pretrained(model_name).to(device)
|