kndambuki commited on
Commit
7758140
·
verified ·
1 Parent(s): 8df334d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -11,11 +11,10 @@ from Gradio_UI import GradioUI
11
 
12
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
13
  @tool
14
- def get_birth_stone(dob:str)-> str: #it's import to specify the return type
15
  # Keep this format for the description / args / args description but feel free to modify the tool
16
- """A tool that takes a date of birth as input. It outputs the birthstone of that month present in the date of birth
17
- Args:
18
- dob: A string representing a person's date of birth
19
  """
20
 
21
  birthstones = {
@@ -33,7 +32,7 @@ def get_birth_stone(dob:str)-> str: #it's import to specify the return type
33
  "December": "Turquoise"
34
  }
35
 
36
- month = datetime.strptime(dob, "%Y-%m-%d").strftime("%B")
37
  birthstone = birthstones.get(month, "Unknown")
38
  if birthstone in image_urls:
39
  response = birthstone
 
11
 
12
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
13
  @tool
14
+ def get_birth_stone(month:str)-> str: #it's import to specify the return type
15
  # Keep this format for the description / args / args description but feel free to modify the tool
16
+ """A tool that takes a month string as input. It outputs the birthstone of that month
17
+ dob: A string representing a month of the year
 
18
  """
19
 
20
  birthstones = {
 
32
  "December": "Turquoise"
33
  }
34
 
35
+ month = month
36
  birthstone = birthstones.get(month, "Unknown")
37
  if birthstone in image_urls:
38
  response = birthstone