Cachoups commited on
Commit
337cec1
·
verified ·
1 Parent(s): d177143

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -199,10 +199,10 @@ def process_pdfs_and_analyze_sentiment(file1, file2, sheet):
199
 
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)
 
199
 
200
  def generate_text(df, country, theme):
201
  # Filter the dataframe based on the country
202
+ for column in df.columns:
 
203
  if column != 'Country':
204
+ df[column] = df[column].apply(lambda x: f"{x:.6f}%")
205
+ row = df[df['Country'] == country].iloc[0]
206
 
207
  # Convert the row to a string format for prompt
208
  row_str = row.to_string(index=True)