Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,22 @@
|
|
1 |
from fastapi import FastAPI
|
|
|
|
|
|
|
2 |
app = FastAPI()
|
3 |
@app.get("/")
|
4 |
async def root():
|
5 |
-
return {"greeting":"Hello world"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from fastapi import FastAPI
|
2 |
+
import psycopg2
|
3 |
+
from psycopg2 import sql
|
4 |
+
import pandas as pd
|
5 |
app = FastAPI()
|
6 |
@app.get("/")
|
7 |
async def root():
|
8 |
+
return {"greeting":"Hello world"}
|
9 |
+
|
10 |
+
db_params = {
|
11 |
+
'host': 'dpg-cnhir5fsc6pc73dvj380-a.oregon-postgres.render.com',
|
12 |
+
'database': 'OpenAI',
|
13 |
+
'user': 'anu',
|
14 |
+
'password': '5omRLogf9Kdas3zoBFPCT9yrCGU4IbEX',
|
15 |
+
}
|
16 |
+
st.header("Profile - Job Description Match Results")
|
17 |
+
|
18 |
+
async def ProfileMatchResults():
|
19 |
+
dbQuery = "select * from profilematch"
|
20 |
+
conn = psycopg2.connect(**db_params)
|
21 |
+
df = pd.read_sql_query(dbQuery, conn)
|
22 |
+
return {"data" : df}
|