luismidv commited on
Commit
d9f2cb7
·
1 Parent(s): 862a2bb
Files changed (2) hide show
  1. app.py +2 -1
  2. try.py +4 -0
app.py CHANGED
@@ -11,8 +11,9 @@ app = FastAPI()
11
  async def predict(id:str):
12
  try:
13
  print(f"Request received {id}")
 
14
  tenant_list = rv.algo_start(int(id))
15
- print(tenant_list)
16
  return tenant_list
17
 
18
  except Exception as error:
 
11
  async def predict(id:str):
12
  try:
13
  print(f"Request received {id}")
14
+ print("Check")
15
  tenant_list = rv.algo_start(int(id))
16
+ print(f"List of tenants {tenant_list}")
17
  return tenant_list
18
 
19
  except Exception as error:
try.py CHANGED
@@ -17,6 +17,10 @@ connection_string = URL.create(
17
  host='ep-rough-fire-a27dp2i1.eu-central-1.pg.koyeb.app',
18
  database='koyebdb',
19
  )
 
 
 
 
20
 
21
  tenant_list = rv.algo_start(10001)
22
  print(tenant_list)
 
17
  host='ep-rough-fire-a27dp2i1.eu-central-1.pg.koyeb.app',
18
  database='koyebdb',
19
  )
20
+ engine = create_engine(connection_string)
21
+
22
+ original_dataframe = pd.read_sql("SELECT * FROM tenants", con=engine)
23
+ print(original_dataframe)
24
 
25
  tenant_list = rv.algo_start(10001)
26
  print(tenant_list)