Update main.py
Browse files
main.py
CHANGED
@@ -52,15 +52,15 @@ def convert_image_to_base64(image_path):
|
|
52 |
return img_base64_string
|
53 |
|
54 |
|
55 |
-
# Function to call the endpoint
|
56 |
-
def call_my_endpoint():
|
57 |
-
|
58 |
-
|
59 |
|
60 |
-
# Configure the scheduler
|
61 |
-
scheduler = BackgroundScheduler()
|
62 |
-
scheduler.add_job(call_my_endpoint, 'interval', seconds=15) # Call every 30 seconds
|
63 |
-
scheduler.start()
|
64 |
|
65 |
@app.post("/get_image_for_text")
|
66 |
async def get_image_for_text(email,query,file: UploadFile = File(...)):
|
|
|
52 |
return img_base64_string
|
53 |
|
54 |
|
55 |
+
# # Function to call the endpoint
|
56 |
+
# def call_my_endpoint():
|
57 |
+
# #response = requests.get("http://127.0.0.1:8000/my-endpoint")
|
58 |
+
# print(f"Endpoint response: {response.json()}")
|
59 |
|
60 |
+
# # Configure the scheduler
|
61 |
+
# scheduler = BackgroundScheduler()
|
62 |
+
# scheduler.add_job(call_my_endpoint, 'interval', seconds=15) # Call every 30 seconds
|
63 |
+
# scheduler.start()
|
64 |
|
65 |
@app.post("/get_image_for_text")
|
66 |
async def get_image_for_text(email,query,file: UploadFile = File(...)):
|