Spaces:
Runtime error
Runtime error
Commit
·
f07e8e2
1
Parent(s):
fa65b7a
Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,8 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
14 |
# Define a function for generating text based on a prompt using the fine-tuned GPT-2 model and the tokenizer
|
15 |
def generate_text(prompt, length=100, theme=None, **kwargs):
|
16 |
|
17 |
-
model_url = "https://huggingface.co/spaces/sailormars18/Yelp-reviews-usingGPT2/
|
18 |
-
config_url = "https://huggingface.co/spaces/sailormars18/Yelp-reviews-usingGPT2/
|
19 |
|
20 |
# Download the model and configuration files
|
21 |
model_path = "./pytorch_model.bin"
|
|
|
14 |
# Define a function for generating text based on a prompt using the fine-tuned GPT-2 model and the tokenizer
|
15 |
def generate_text(prompt, length=100, theme=None, **kwargs):
|
16 |
|
17 |
+
model_url = "https://huggingface.co/spaces/sailormars18/Yelp-reviews-usingGPT2/blob/main/pytorch_model.bin"
|
18 |
+
config_url = "https://huggingface.co/spaces/sailormars18/Yelp-reviews-usingGPT2/blob/main/config.json"
|
19 |
|
20 |
# Download the model and configuration files
|
21 |
model_path = "./pytorch_model.bin"
|