Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -124,13 +124,18 @@ async def handle_chat(user_input):
|
|
124 |
|
125 |
# If there's a URL, fetch the context
|
126 |
if url:
|
|
|
127 |
context = await extract_text_from_html(url)
|
128 |
user_input = processed_query
|
|
|
129 |
else:
|
130 |
# Custom prompt shims
|
131 |
if "translate" in user_input:
|
|
|
132 |
context=""
|
133 |
prompt=""
|
|
|
|
|
134 |
|
135 |
else: # Search task
|
136 |
search_start_time = time.time()
|
|
|
124 |
|
125 |
# If there's a URL, fetch the context
|
126 |
if url:
|
127 |
+
search_start_time = time.time()
|
128 |
context = await extract_text_from_html(url)
|
129 |
user_input = processed_query
|
130 |
+
search_end_time = time.time()
|
131 |
else:
|
132 |
# Custom prompt shims
|
133 |
if "translate" in user_input:
|
134 |
+
search_start_time = time.time()
|
135 |
context=""
|
136 |
prompt=""
|
137 |
+
search_end_time = time.time()
|
138 |
+
|
139 |
|
140 |
else: # Search task
|
141 |
search_start_time = time.time()
|