Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
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],
|