Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,7 +53,9 @@ def postprocess(text):
|
|
| 53 |
|
| 54 |
|
| 55 |
def predict(input, max_length, top_p, temperature, history):
|
| 56 |
-
if input
|
|
|
|
|
|
|
| 57 |
input = '現在你作為一個專業的編劇,你需要為故事%s轉寫一段故事大綱提供一個完整的龍骨給之後的編劇用。' %input
|
| 58 |
else:
|
| 59 |
input = '請為『%s』選取5個公式' %input
|
|
|
|
| 53 |
|
| 54 |
|
| 55 |
def predict(input, max_length, top_p, temperature, history):
|
| 56 |
+
if input is None:
|
| 57 |
+
return
|
| 58 |
+
elif input.isdigit():
|
| 59 |
input = '現在你作為一個專業的編劇,你需要為故事%s轉寫一段故事大綱提供一個完整的龍骨給之後的編劇用。' %input
|
| 60 |
else:
|
| 61 |
input = '請為『%s』選取5個公式' %input
|