Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -200,9 +200,9 @@ def process_pdfs_and_analyze_sentiment(file1, file2, sheet):
|
|
| 200 |
def generate_text(df, country, theme):
|
| 201 |
# Filter the dataframe based on the country
|
| 202 |
row = df[df['Country'] == country].iloc[0]
|
| 203 |
-
for column in
|
| 204 |
if column != 'Country':
|
| 205 |
-
|
| 206 |
|
| 207 |
# Convert the row to a string format for prompt
|
| 208 |
row_str = row.to_string(index=True)
|
|
|
|
| 200 |
def generate_text(df, country, theme):
|
| 201 |
# Filter the dataframe based on the country
|
| 202 |
row = df[df['Country'] == country].iloc[0]
|
| 203 |
+
for column in row.columns:
|
| 204 |
if column != 'Country':
|
| 205 |
+
row[column] = row[column].apply(lambda x: f"{x:.6f}%")
|
| 206 |
|
| 207 |
# Convert the row to a string format for prompt
|
| 208 |
row_str = row.to_string(index=True)
|