Technozam commited on
Commit
6c3fd16
1 Parent(s): afb72cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -377,7 +377,11 @@ def generate_question_text(context,subject,total):
377
  elif (words_subject < 1):
378
  raise gr.Error("Invalid Input (Title must be one or more than one word).")
379
 
380
- else:
 
 
 
 
381
  summary_text = summarizer(context,summary_model,summary_tokenizer)
382
  for wrp in wrap(summary_text, 150):
383
  print (wrp)
@@ -431,7 +435,6 @@ def generate_question_text(context,subject,total):
431
 
432
  return output
433
 
434
-
435
  iface = gr.Interface(
436
  fn=generate_question_text,
437
  inputs=[context,subject,total],
 
377
  elif (words_subject < 1):
378
  raise gr.Error("Invalid Input (Title must be one or more than one word).")
379
 
380
+
381
+ elif (words_subject < 1):
382
+ raise gr.Error("Invalid Input (Title must be one or more than one word).")
383
+
384
+ else:
385
  summary_text = summarizer(context,summary_model,summary_tokenizer)
386
  for wrp in wrap(summary_text, 150):
387
  print (wrp)
 
435
 
436
  return output
437
 
 
438
  iface = gr.Interface(
439
  fn=generate_question_text,
440
  inputs=[context,subject,total],