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)