Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,17 +28,13 @@ def process_excel(file):
|
|
28 |
result_df = pd.DataFrame(keyword_counts.items(), columns=['Keyword', 'Frequency'])
|
29 |
result_df = result_df.sort_values(by='Frequency', ascending=False).reset_index(drop=True)
|
30 |
|
31 |
-
# A4, B4λΆν° κ²°κ³Όλ₯Ό μμνλλ‘ λ°μ΄ν°νλ μμ μμ
|
32 |
-
result_df_shifted = pd.DataFrame(index=range(3)) # λΉ λ°μ΄ν°νλ μ μμ± (3μΉΈ μλλ‘ μ΄λ)
|
33 |
-
result_df_shifted = pd.concat([result_df_shifted, result_df]).reset_index(drop=True)
|
34 |
-
|
35 |
# λλ ν 리 μμ± νμΈ λ° νμΌ μ μ₯
|
36 |
output_dir = "output"
|
37 |
if not os.path.exists(output_dir):
|
38 |
os.makedirs(output_dir)
|
39 |
|
40 |
output_file = os.path.join(output_dir, "keyword_counts.xlsx")
|
41 |
-
|
42 |
|
43 |
return output_file
|
44 |
|
|
|
28 |
result_df = pd.DataFrame(keyword_counts.items(), columns=['Keyword', 'Frequency'])
|
29 |
result_df = result_df.sort_values(by='Frequency', ascending=False).reset_index(drop=True)
|
30 |
|
|
|
|
|
|
|
|
|
31 |
# λλ ν 리 μμ± νμΈ λ° νμΌ μ μ₯
|
32 |
output_dir = "output"
|
33 |
if not os.path.exists(output_dir):
|
34 |
os.makedirs(output_dir)
|
35 |
|
36 |
output_file = os.path.join(output_dir, "keyword_counts.xlsx")
|
37 |
+
result_df.to_excel(output_file, index=False)
|
38 |
|
39 |
return output_file
|
40 |
|