EgorButenko commited on
Commit
e2e8a9e
·
verified ·
1 Parent(s): eaeeeac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -8,7 +8,7 @@ from bs4 import BeautifulSoup
8
 
9
  from Gradio_UI import GradioUI
10
 
11
- # Below is an example of a tool that does nothing. Amaze us with your creativity !
12
  @tool
13
  def get_weather(city: str) -> str:
14
  """Get current weather for a city using reliable weather services.
@@ -83,9 +83,13 @@ def get_horoscope(zodiac_sign: str, day: str = 'today') -> str:
83
  Returns:
84
  Horoscope text
85
  """
 
 
 
 
86
  url = (
87
  "https://www.horoscope.com/us/horoscopes/general/"
88
- f"horoscope-general-daily-{day}.aspx?sign={zodiac_sign}"
89
  )
90
  soup = BeautifulSoup(requests.get(url).content,
91
  "html.parser")
 
8
 
9
  from Gradio_UI import GradioUI
10
 
11
+
12
  @tool
13
  def get_weather(city: str) -> str:
14
  """Get current weather for a city using reliable weather services.
 
83
  Returns:
84
  Horoscope text
85
  """
86
+ dic = {'Aries': 1, 'Taurus': 2, 'Gemini': 3,
87
+ 'Cancer': 4, 'Leo': 5, 'Virgo': 6,
88
+ 'Libra': 7, 'Scorpio': 8, 'Sagittarius': 9,
89
+ 'Capricorn': 10, 'Aquarius': 11, 'Pisces': 12}
90
  url = (
91
  "https://www.horoscope.com/us/horoscopes/general/"
92
+ f"horoscope-general-daily-{day}.aspx?sign={dic[zodiac_sign]}"
93
  )
94
  soup = BeautifulSoup(requests.get(url).content,
95
  "html.parser")