Skip to content

Commit

Permalink
predict js solved
Browse files Browse the repository at this point in the history
  • Loading branch information
ombhojane committed Feb 11, 2024
1 parent cfe33e4 commit 2a4ce36
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@

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:
response = future.result(timeout=RESPONSE_TIMEOUT)
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 = {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion templates/predict.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
<link rel="stylesheet" href="../static/css/generatestyles.css" />
<script src="../static/js/predict.js"></script>
<script src="../static/predict.js"></script>

</head>
<body>
Expand Down

0 comments on commit 2a4ce36

Please sign in to comment.