File size: 806 Bytes
d4cbf2e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import requests
from pydantic import BaseModel

# Define the class for the input data
class AddSkillDetails(BaseModel):
    SkillName: str = 'SkillName'
    SkillType: str = 'Soft Skill'
    SkillScore: int = 10

# Define the data to be sent to the API
data = AddSkillDetails(
    SkillName='TestSkill1',
    SkillType='SkillType',
    SkillScore=50  # Example score
)

# URL of the API endpoint
url = "https://vaibhav84-resumeapi.hf.space/AddSkillDetails/"

# Make the POST request
response = requests.post(url, json=data.dict())

# Check the response
if response.status_code == 200:
    print("Skill details added successfully.")
    print("Response:", response.json())
else:
    print("Failed to add skill details.")
    print("Status code:", response.status_code)
    print("Response:", response.text)