jayur commited on
Commit
e58c935
·
verified ·
1 Parent(s): f8acc7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -21,7 +21,8 @@ def lingua_stats(language:str)->str: #it's import to specify the return type
21
  model = HfApiModel()
22
  agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=model)
23
  world_population = float(agent.run("What is the world population as a float?"))
24
- lang_spkrs = float(agent.run(f"How many people in the speak {language} as a float?"))
 
25
  lang_spkrs_pct = (lang_spkrs/world_population)*100
26
  return f"The percentage of {language} speaking population in the world is %3.3f: ({str(lang_spkrs_pct)})"
27
  except Exception as e:
 
21
  model = HfApiModel()
22
  agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=model)
23
  world_population = float(agent.run("What is the world population as a float?"))
24
+ lang_spkrs = float(agent.run(f"How many people in the world speak {language} as a float?"))
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 %3.3f: ({str(lang_spkrs_pct)})"
28
  except Exception as e: