|
from fastapi import FastAPI |
|
import psycopg2 |
|
from psycopg2 import sql |
|
import pandas as pd |
|
app = FastAPI() |
|
@app.get("/") |
|
async def root(): |
|
return {"greeting":"Hello world"} |
|
|
|
db_params = { |
|
'host': 'dpg-cnhir5fsc6pc73dvj380-a.oregon-postgres.render.com', |
|
'database': 'OpenAI', |
|
'user': 'anu', |
|
'password': '5omRLogf9Kdas3zoBFPCT9yrCGU4IbEX', |
|
} |
|
st.header("Profile - Job Description Match Results") |
|
|
|
async def ProfileMatchResults(): |
|
dbQuery = "select * from profilematch" |
|
conn = psycopg2.connect(**db_params) |
|
df = pd.read_sql_query(dbQuery, conn) |
|
return {"data" : df} |