Spaces:
Sleeping
Sleeping
Lautaro Cardarelli
commited on
Commit
·
c3cccdc
1
Parent(s):
5f20db4
add validation
Browse files
app.py
CHANGED
|
@@ -135,9 +135,13 @@ class SummarizerAndQA:
|
|
| 135 |
return generate_summary(text)
|
| 136 |
|
| 137 |
def process_questions(self):
|
|
|
|
|
|
|
| 138 |
return generate_questions(self.input_text)
|
| 139 |
|
| 140 |
def process_question_response(self, question, history):
|
|
|
|
|
|
|
| 141 |
return generate_question_response(question, self.input_text)
|
| 142 |
|
| 143 |
summarizer_and_qa = SummarizerAndQA()
|
|
|
|
| 135 |
return generate_summary(text)
|
| 136 |
|
| 137 |
def process_questions(self):
|
| 138 |
+
if not self.is_text_loaded:
|
| 139 |
+
return "Primero ingresa el texto en la seccion de Resumen"
|
| 140 |
return generate_questions(self.input_text)
|
| 141 |
|
| 142 |
def process_question_response(self, question, history):
|
| 143 |
+
if not self.is_text_loaded:
|
| 144 |
+
return "Primero ingresa el texto en la seccion de Resumen"
|
| 145 |
return generate_question_response(question, self.input_text)
|
| 146 |
|
| 147 |
summarizer_and_qa = SummarizerAndQA()
|