Vaibhav84 commited on
Commit
ea9181c
·
1 Parent(s): 746a354
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -41,13 +41,22 @@ model = SentenceTransformer('all-MiniLM-L6-v2')
41
 
42
  @app.get("/")
43
  async def root():
44
- return {"SkillAPI":"SkillAPi Version 1.00, https://vaibhav84-resumeapi.hf.space/redoc , https://vaibhav84-resumeapi.hf.space/docs"}
45
 
46
  def parse_csv(df):
47
  res = df.to_json(orient="records")
48
  parsed = json.loads(res)
49
  return parsed
50
 
 
 
 
 
 
 
 
 
 
51
 
52
  @app.post("/UploadJobDescription/")
53
  async def UploadJobDescription(file: bytes = File(...), FileName: str = "sample.pdf"):
 
41
 
42
  @app.get("/")
43
  async def root():
44
+ return {"Recommendation":"Recommendation Version 1.00, https://vaibhav84-recommendation.hf.space/redoc , https://vaibhav84-recommendation.hf.space/docs"}
45
 
46
  def parse_csv(df):
47
  res = df.to_json(orient="records")
48
  parsed = json.loads(res)
49
  return parsed
50
 
51
+ @app.post("/CustomerLogin/")
52
+ async def UploadJobDescription(CustomerID : str, CustomerPwd: str):
53
+ try:
54
+ if CustomerID != "" and CustomerPwd == (CustomerID + "123"):
55
+ return "Login Successful"
56
+ else:
57
+ return "Login Failed"
58
+ except Exception as e:
59
+ return "An error occurred: {e}"
60
 
61
  @app.post("/UploadJobDescription/")
62
  async def UploadJobDescription(file: bytes = File(...), FileName: str = "sample.pdf"):