DavidSB commited on
Commit
e7c1c04
verified
1 Parent(s): 5c55fda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -17
app.py CHANGED
@@ -266,32 +266,19 @@ def calculate_equivalent(manual, manual_RH_O, manual_RH_D, requer, docs, it, pro
266
  'IT': [f'IT_{it}_{datetime.datetime.now().year}_EQUIV']
267
  })
268
 
269
- # Salva o DataFrame em um arquivo Excel
270
- #excel_file = 'Planilha_hist贸rico_IT.xlsx'
271
- #results_df.to_excel(excel_file, index=False)
272
-
273
- # Verifica se o arquivo j谩 existe
274
- #if os.path.exists('Planilha_hist贸rico_IT.xlsx'):
275
- #existing_df = pd.read_excel('Planilha_hist贸rico_IT.xlsx')
276
- #updated_df = pd.concat([existing_df, results_df], ignore_index=True)
277
- #if incluir == "Sim":
278
- #pdated_df.to_excel('Planilha_hist贸rico_IT.xlsx', index=False)
279
- #else:
280
- #results_df.to_excel('Planilha_hist贸rico_IT.xlsx', index=False)
281
-
282
-
283
  # Salva o DataFrame em um arquivo Excel
284
  excel_file = 'Planilha_hist贸rico_IT.xlsx'
285
  results_df.to_excel(excel_file, index=False)
286
 
287
  # Verifica se o arquivo j谩 existe
288
- if os.path.exists('https://huggingface.co/spaces/DavidSB/Eqv/resolve/main/Planilha_hist贸rico_IT.xlsx'):
289
  existing_df = pd.read_excel('Planilha_hist贸rico_IT.xlsx')
290
  updated_df = pd.concat([existing_df, results_df], ignore_index=True)
291
  if incluir == "Sim":
292
- pdated_df.to_excel('https://huggingface.co/spaces/DavidSB/Eqv/resolve/main/Planilha_hist贸rico_IT.xlsx', index=False)
293
  else:
294
- results_df.to_excel('https://huggingface.co/spaces/DavidSB/Eqv/resolve/main/Planilha_hist贸rico_IT.xlsx', index=False)
 
295
 
296
  #---------------------------------------------------------MAPA---------------------------------------------------------#
297
 
 
266
  'IT': [f'IT_{it}_{datetime.datetime.now().year}_EQUIV']
267
  })
268
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
269
  # Salva o DataFrame em um arquivo Excel
270
  excel_file = 'Planilha_hist贸rico_IT.xlsx'
271
  results_df.to_excel(excel_file, index=False)
272
 
273
  # Verifica se o arquivo j谩 existe
274
+ if os.path.exists('Planilha_hist贸rico_IT.xlsx'):
275
  existing_df = pd.read_excel('Planilha_hist贸rico_IT.xlsx')
276
  updated_df = pd.concat([existing_df, results_df], ignore_index=True)
277
  if incluir == "Sim":
278
+ updated_df.to_excel('Planilha_hist贸rico_IT.xlsx', index=False)
279
  else:
280
+ results_df.to_excel('Planilha_hist贸rico_IT.xlsx', index=False)
281
+
282
 
283
  #---------------------------------------------------------MAPA---------------------------------------------------------#
284