npc0 commited on
Commit
774c0ee
·
1 Parent(s): 38768c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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.isdigit():
 
 
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