xiomarablanco commited on
Commit
110d7be
·
1 Parent(s): 712b2f5

Mensajes de error si no hay archivos seleccionados

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -19,10 +19,11 @@ def Main(uploadedFile, txtFileInput, orthographyPercentage, syntaxPercentage, se
19
  copySpanishDictionaries()
20
 
21
  try:
22
- # if not txtFileInput:
23
- # txtFileInput = "./assets/qa.txt"
24
- #else:
25
- txtFileInput = txtFileInput.name
 
26
 
27
  configuration = readQATextFile(txtFileInput)
28
 
@@ -35,10 +36,10 @@ def Main(uploadedFile, txtFileInput, orthographyPercentage, syntaxPercentage, se
35
 
36
  configuration["students"] = studentsRange
37
 
38
- #if not uploadedFile:
39
- # uploadedFilePath = "./assets/test_data.zip"
40
- #else:
41
- uploadedFilePath = uploadedFile.name
42
 
43
  config_json = load_json("configV2.json")
44
 
 
19
  copySpanishDictionaries()
20
 
21
  try:
22
+ if not txtFileInput:
23
+ error="Por favor seleccione un archivo con las preguntas y respuestas"
24
+ return [error, excelPath]
25
+ else:
26
+ txtFileInput = txtFileInput.name
27
 
28
  configuration = readQATextFile(txtFileInput)
29
 
 
36
 
37
  configuration["students"] = studentsRange
38
 
39
+ if not uploadedFile:
40
+ error="Por favor seleccione el .zip con las respuestas de los alumnos"
41
+ else:
42
+ uploadedFilePath = uploadedFile.name
43
 
44
  config_json = load_json("configV2.json")
45