Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -61,31 +61,6 @@ def data_pre_processing(file_responses):
|
|
61 |
merged_dataset = pd.concat([initial_dataset_1, initial_dataset_2, initial_dataset_3], ignore_index=True)
|
62 |
|
63 |
|
64 |
-
|
65 |
-
# # Convert columns to numeric and fill NaN values with 0
|
66 |
-
# for col in columns:
|
67 |
-
# file_responses[col] = pd.to_numeric(file_responses[col], errors='coerce').fillna(0)
|
68 |
-
|
69 |
-
# # Calculate the Total Allocation
|
70 |
-
# file_responses['Total Allocation'] = file_responses[columns].sum(axis=1)
|
71 |
-
|
72 |
-
# # Convert the Tax Payment column to numeric
|
73 |
-
# tax_payment_col = '''How much was your latest Tax payment (in U$D) ?
|
74 |
-
|
75 |
-
# Please try to be as accurate as possible:
|
76 |
-
# Eg.: If your last tax amount was INR 25,785/-; then convert it in U$D and enter only the amount as: 310.
|
77 |
-
|
78 |
-
# If you have never paid tax, consider putting in a realistic donation amount which wish to contribute towards helping yourself obtain the desired relief.'''
|
79 |
-
|
80 |
-
# file_responses[tax_payment_col] = pd.to_numeric(file_responses[tax_payment_col], errors='coerce').fillna(0)
|
81 |
-
|
82 |
-
# # Calculate Financial Token Weights
|
83 |
-
# for i, col in enumerate(columns, start=1):
|
84 |
-
# file_responses[f'Financial Token Weight for Problem {i}'] = (
|
85 |
-
# file_responses[tax_payment_col] * file_responses[col] / file_responses['Total Allocation']
|
86 |
-
# ).fillna(0)
|
87 |
-
|
88 |
-
|
89 |
# Different return can be used to check the processing
|
90 |
# return file_responses
|
91 |
return merged_dataset
|
@@ -144,7 +119,7 @@ interface = gr.Interface(
|
|
144 |
title = (
|
145 |
"<p style='font-weight: bold; font-size: 25px; text-align: center;'>"
|
146 |
"<span style='color: blue;'>Upload Excel file containing #TaxDirections</span> "
|
147 |
-
"
|
148 |
"<span style='color: green;'>Download HyperLocal Project Proposals</span>"
|
149 |
"</p>\n"
|
150 |
),
|
|
|
61 |
merged_dataset = pd.concat([initial_dataset_1, initial_dataset_2, initial_dataset_3], ignore_index=True)
|
62 |
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
# Different return can be used to check the processing
|
65 |
# return file_responses
|
66 |
return merged_dataset
|
|
|
119 |
title = (
|
120 |
"<p style='font-weight: bold; font-size: 25px; text-align: center;'>"
|
121 |
"<span style='color: blue;'>Upload Excel file containing #TaxDirections</span> "
|
122 |
+
"<span style='color: brown; font-size: 35px;'>→ </span>"
|
123 |
"<span style='color: green;'>Download HyperLocal Project Proposals</span>"
|
124 |
"</p>\n"
|
125 |
),
|