Spaces:
Runtime error
Runtime error
Commit
Β·
447c535
1
Parent(s):
f568152
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import torch
|
|
7 |
import transformers
|
8 |
|
9 |
# Define a function for generating text based on a prompt using the fine-tuned GPT-2 model and the tokenizer
|
10 |
-
def generate_text(prompt, length=100, theme=None
|
11 |
|
12 |
model_url = "https://huggingface.co/spaces/sailormars18/Yelp-reviews-usingGPT2/blob/main/pytorch_model.bin"
|
13 |
|
@@ -88,4 +88,4 @@ iface = gr.Interface(
|
|
88 |
flagging_options=[("π", "positive"), ("π", "negative")],
|
89 |
)
|
90 |
|
91 |
-
iface.launch(debug=False
|
|
|
7 |
import transformers
|
8 |
|
9 |
# Define a function for generating text based on a prompt using the fine-tuned GPT-2 model and the tokenizer
|
10 |
+
def generate_text(prompt, length=100, theme=None):
|
11 |
|
12 |
model_url = "https://huggingface.co/spaces/sailormars18/Yelp-reviews-usingGPT2/blob/main/pytorch_model.bin"
|
13 |
|
|
|
88 |
flagging_options=[("π", "positive"), ("π", "negative")],
|
89 |
)
|
90 |
|
91 |
+
iface.launch(debug=False)
|