Spaces:
Runtime error
Runtime error
kmkarakaya
commited on
Commit
·
f065c0b
1
Parent(s):
21d92bc
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,8 @@ review_model = TFGPT2LMHeadModel.from_pretrained("kmkarakaya/turkishReviews-ds")
|
|
5 |
review_tokenizer = AutoTokenizer.from_pretrained("kmkarakaya/turkishReviews-ds")
|
6 |
|
7 |
def generate_review(prompt):
|
|
|
|
|
8 |
input_ids = review_tokenizer.encode(prompt, return_tensors='tf')
|
9 |
context_length = 40
|
10 |
output = review_model.generate(
|
|
|
5 |
review_tokenizer = AutoTokenizer.from_pretrained("kmkarakaya/turkishReviews-ds")
|
6 |
|
7 |
def generate_review(prompt):
|
8 |
+
if prompt is None:
|
9 |
+
prompt = " "
|
10 |
input_ids = review_tokenizer.encode(prompt, return_tensors='tf')
|
11 |
context_length = 40
|
12 |
output = review_model.generate(
|