From 2a4ce36f059bf480ddaf5aeaa3bbda7b4bcf5aa2 Mon Sep 17 00:00:00 2001 From: ombhojane Date: Sun, 11 Feb 2024 17:13:46 +0530 Subject: [PATCH] predict js solved --- app.py | 6 +++--- static/{js => }/predict.js | 0 templates/predict.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename static/{js => }/predict.js (100%) diff --git a/app.py b/app.py index 382a1cc..846a803 100644 --- a/app.py +++ b/app.py @@ -11,8 +11,8 @@ executor = ThreadPoolExecutor(max_workers=3) -# Define the timeout for waiting for the response -RESPONSE_TIMEOUT = 60 # in seconds, adjust as needed + +RESPONSE_TIMEOUT = 60 def check_status(future, section): try: @@ -20,7 +20,7 @@ def check_status(future, section): clean_response = response.text.replace("**", "") return section, clean_response except Exception as e: - return section, str(e) # Handle exceptions such as timeouts + return section, str(e) def generate_description(service_name): prompt_templates = { diff --git a/static/js/predict.js b/static/predict.js similarity index 100% rename from static/js/predict.js rename to static/predict.js diff --git a/templates/predict.html b/templates/predict.html index 3b19e18..b2d076d 100644 --- a/templates/predict.html +++ b/templates/predict.html @@ -8,7 +8,7 @@ - +