xiomarablanco commited on
Commit
542ac0d
1 Parent(s): aba3dab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -81,15 +81,16 @@ def Main(uploadedFile, txtFileInput, orthographyPercentage, syntaxPercentage, se
81
  return [error, excelPath]
82
 
83
  # modelJson = json.dumps(modelResult)
84
- print(modelResult)
85
- excelPath = exportResultToExcelFile(modelResult)
 
86
 
87
  except Exception as ex:
88
  error = "Error exporting to Excel: " + str(ex)
89
 
90
  return [error, excelPath]
91
 
92
- def exportResultToExcelFile(modelResult):
93
  try:
94
  excelData = []
95
 
@@ -106,7 +107,7 @@ def exportResultToExcelFile(modelResult):
106
 
107
  tableResults.json=json.dumps(excelData)
108
  tableExport=tableResults.export('xlsx')
109
- outputFilePath = './output/' + str(datetime.now().microsecond) + '_plentas_output.xlsx'
110
  # outputFilePath = './output/plentas_output.xlsx'
111
  with open(outputFilePath, 'wb') as f: # open the xlsx file
112
  f.write(tableExport) # write the dataset to the xlsx file
 
81
  return [error, excelPath]
82
 
83
  # modelJson = json.dumps(modelResult)
84
+ #print(modelResult)
85
+ outputFilePath= = './output/' + str(datetime.now().microsecond) + '_plentas_output.xlsx'
86
+ excelPath = exportResultToExcelFile(modelResult, outputFilePath)
87
 
88
  except Exception as ex:
89
  error = "Error exporting to Excel: " + str(ex)
90
 
91
  return [error, excelPath]
92
 
93
+ def exportResultToExcelFile(modelResult, outputFilePath):
94
  try:
95
  excelData = []
96
 
 
107
 
108
  tableResults.json=json.dumps(excelData)
109
  tableExport=tableResults.export('xlsx')
110
+ #outputFilePath = './output/' + str(datetime.now().microsecond) + '_plentas_output.xlsx'
111
  # outputFilePath = './output/plentas_output.xlsx'
112
  with open(outputFilePath, 'wb') as f: # open the xlsx file
113
  f.write(tableExport) # write the dataset to the xlsx file