Spaces:
Sleeping
Sleeping
API test
Browse files
app.py
CHANGED
@@ -41,13 +41,22 @@ model = SentenceTransformer('all-MiniLM-L6-v2')
|
|
41 |
|
42 |
@app.get("/")
|
43 |
async def root():
|
44 |
-
return {"
|
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"):
|