jayur commited on
Commit
7306ee5
·
verified ·
1 Parent(s): 3db4977

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -23,7 +23,7 @@ def lingua_stats(language:str)->str: #it's import to specify the return type
23
  world_population = float(agent.run("What is the world population? Provide the answer as a single number"))
24
  lang_spkrs = float(agent.run(f"How many people in the world speak {language} as a float? Provide the answer as a single number"))
25
  print(world_population, lang_spkrs)
26
- lang_spkrs_pct = (lang_spkrs/world_population)*100
27
  return f"The percentage of {language} speaking population in the world is : {lang_spkrs_pct:3.9f}%"
28
  except Exception as e:
29
  return f"Error: Search failed for {language}"
 
23
  world_population = float(agent.run("What is the world population? Provide the answer as a single number"))
24
  lang_spkrs = float(agent.run(f"How many people in the world speak {language} as a float? Provide the answer as a single number"))
25
  print(world_population, lang_spkrs)
26
+ lang_spkrs_pct = round((lang_spkrs/world_population)*100, 9)
27
  return f"The percentage of {language} speaking population in the world is : {lang_spkrs_pct:3.9f}%"
28
  except Exception as e:
29
  return f"Error: Search failed for {language}"