Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -84,8 +84,12 @@ def data_pre_processing(file_responses):
|
|
| 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 |
return merged_dataset
|
|
|
|
| 89 |
except Exception as e:
|
| 90 |
return str(e)
|
| 91 |
|
|
@@ -135,22 +139,31 @@ interface = gr.Interface(
|
|
| 135 |
|
| 136 |
|
| 137 |
# title="Excel File Uploader",
|
| 138 |
-
title="Upload Excel file containing #TaxDirections → Download HyperLocal Project Proposals\n",
|
|
|
|
|
|
|
| 139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
|
| 141 |
description=(
|
| 142 |
-
"<p style='font-weight: bold; font-size: 15px;'>Upload an Excel file to process and download the result or use the Example files:</p>"
|
| 143 |
-
|
| 144 |
-
"<p style='font-weight: bold; font-size: 15px; text-align: right;'>Processed output contains a Project Proposal for each Location~Problem paired combination (i.e. each cell).</p>"
|
| 145 |
|
| 146 |
-
"<p style='font-weight: bold; font-size:
|
|
|
|
| 147 |
|
| 148 |
-
"<p style='font-weight: bold; font-size: 15px; text-align: right;'>Corresponding Budget Allocation and estimated Project Completion Time are provided in different sheets.</p>"
|
| 149 |
|
| 150 |
-
|
| 151 |
-
"<p style='font-size: 12px; color: gray; text-align: center'>This tool allows for the systematic evaluation and proposal of solutions tailored to specific location-problem pairs, ensuring efficient resource allocation and project planning.</p>"
|
| 152 |
"<p style='font-size: 12px; color: gray; text-align: center'>Note: The example files provided above are for demonstration purposes. Feel free to upload your own Excel files to see the results. If you have any questions, refer to the documentation-links or contact <a href='https://www.change.org/p/democracy-evolution-ensuring-humanity-s-eternal-existence-through-taxdirection' target='_blank'>support</a>.</p>"
|
| 153 |
-
|
| 154 |
) # Solid description with right-aligned second sentence
|
| 155 |
|
| 156 |
)
|
|
|
|
| 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
|
| 92 |
+
|
| 93 |
except Exception as e:
|
| 94 |
return str(e)
|
| 95 |
|
|
|
|
| 139 |
|
| 140 |
|
| 141 |
# title="Excel File Uploader",
|
| 142 |
+
# title="Upload Excel file containing #TaxDirections → Download HyperLocal Project Proposals\n",
|
| 143 |
+
|
| 144 |
+
# "<p style='font-weight: bold; font-size: 15px; color: red;'>Upload Excel file containing #TaxDirections → Download HyperLocal Project Proposals</p>\n"
|
| 145 |
|
| 146 |
+
title = (
|
| 147 |
+
"<p style='font-weight: bold; font-size: 15px; text-align: center;'>"
|
| 148 |
+
"<span style='color: red;'>Upload Excel file containing #TaxDirections</span> "
|
| 149 |
+
"→ "
|
| 150 |
+
"<span style='color: blue;'>Download HyperLocal Project Proposals</span>"
|
| 151 |
+
"</p>\n"
|
| 152 |
+
)
|
| 153 |
+
|
| 154 |
+
|
| 155 |
|
| 156 |
description=(
|
| 157 |
+
"<p style='font-weight: bold; font-size: 15px; color: red;'>Upload an Excel file to process and download the result or use the Example files:</p>"
|
| 158 |
+
"<p style='font-weight: bold; font-size: 15px; color: red;'>(click on any of them to directly process the file and Download the result)</p>"
|
|
|
|
| 159 |
|
| 160 |
+
"<p style='font-weight: bold; font-size: 14px; color: blue; text-align: right;'>Processed output contains a Project Proposal for each Location~Problem paired combination (i.e. each cell).</p>"
|
| 161 |
+
"<p style='font-weight: bold; font-size: 14px; color: blue; text-align: right;'>Corresponding Budget Allocation and estimated Project Completion Time are provided in different sheets.</p>"
|
| 162 |
|
|
|
|
| 163 |
|
| 164 |
+
"<p style='font-size: 12px; color: gray; text-align: center'>This tool allows for the systematic evaluation and proposal of solutions tailored to specific location-problem pairs, ensuring efficient resource allocation and project planning. For more information, visit <a href='https://santanban.github.io/TaxDirection/' target='_blank'>#TaxDirection weblink</a>.</p>"
|
|
|
|
| 165 |
"<p style='font-size: 12px; color: gray; text-align: center'>Note: The example files provided above are for demonstration purposes. Feel free to upload your own Excel files to see the results. If you have any questions, refer to the documentation-links or contact <a href='https://www.change.org/p/democracy-evolution-ensuring-humanity-s-eternal-existence-through-taxdirection' target='_blank'>support</a>.</p>"
|
| 166 |
+
|
| 167 |
) # Solid description with right-aligned second sentence
|
| 168 |
|
| 169 |
)
|