xiomarablanco commited on
Commit
e936903
1 Parent(s): 62bae05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -90,6 +90,7 @@ def Main(uploadedFile, txtFileInput, orthographyPercentage, syntaxPercentage, se
90
  return [error, excelPath]
91
 
92
  def exportResultToExcelFile(modelResult):
 
93
  try:
94
  excelData = []
95
 
@@ -102,7 +103,7 @@ def exportResultToExcelFile(modelResult):
102
  index+= 1
103
 
104
  #tableResults = tablib.Dataset(headers=('ID', 'SimilitudSpacy', 'SimilitudBert', 'NotaSemanticaSpacy', 'NotaSemanticaBert', 'NotaSintaxis', 'NotaOrtografia','NotaTotalSpacy','NotaTotalBert','Feedback'))
105
- tableResults = tablib.Dataset(headers=('ID', 'SumaTotalSpacy', 'SumaTotaldBert', 'NotaSemanticaSpacy', 'NotaSemanticaBert', 'NotaSintaxis', 'NotaOrtografia','NotaTotalSpacy','NotaTotalBert','Feedback'))
106
 
107
  tableResults.json=json.dumps(excelData)
108
  tableExport=tableResults.export('xlsx')
@@ -112,7 +113,7 @@ def exportResultToExcelFile(modelResult):
112
  f.write(tableExport) # write the dataset to the xlsx file
113
  f.close()
114
 
115
- except Exception as ex:
116
  print("Error exportando Excel:"+ str(e))
117
 
118
  return outputFilePath
 
90
  return [error, excelPath]
91
 
92
  def exportResultToExcelFile(modelResult):
93
+ try:
94
  try:
95
  excelData = []
96
 
 
103
  index+= 1
104
 
105
  #tableResults = tablib.Dataset(headers=('ID', 'SimilitudSpacy', 'SimilitudBert', 'NotaSemanticaSpacy', 'NotaSemanticaBert', 'NotaSintaxis', 'NotaOrtografia','NotaTotalSpacy','NotaTotalBert','Feedback'))
106
+ tableResults = tablib.Dataset(headers=('ID', 'SumaTotalSpacy', 'SumaTotaldBert', 'NotaSemanticaSpacy', 'NotaSemanticaBert', 'NotaSintaxis', 'NotaOrtografia','NotaTotalSpacy','NotaTotalBert','Feedback'))
107
 
108
  tableResults.json=json.dumps(excelData)
109
  tableExport=tableResults.export('xlsx')
 
113
  f.write(tableExport) # write the dataset to the xlsx file
114
  f.close()
115
 
116
+ except Exception as ex:
117
  print("Error exportando Excel:"+ str(e))
118
 
119
  return outputFilePath