yangheng commited on
Commit
5dbe0d0
1 Parent(s): 681ad66

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -180,6 +180,8 @@ def perform_acos_inference(text, dataset):
180
 
181
 
182
  def run_demo(text, dataset, task):
 
 
183
  try:
184
  data = {
185
  "text": text,
 
180
 
181
 
182
  def run_demo(text, dataset, task):
183
+ if len(text.split()) > 600:
184
+ raise RuntimeError('Text is too long!')
185
  try:
186
  data = {
187
  "text": text,