Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -363,10 +363,10 @@ def generate_final_response(prompt, history):
|
|
363 |
yield output
|
364 |
except StopAsyncIteration:
|
365 |
yield "Sorry, could you provide more details to clarify your query"
|
366 |
-
except:
|
367 |
-
yield "Sorry, your query couldn't be processed. Retry with correct name of stock"
|
368 |
-
except:
|
369 |
-
yield "Connection couldn't be established with LLM, Model might be overloaded!"
|
370 |
|
371 |
def generate_function_call(prompt):
|
372 |
# temperature = float(temperature)
|
@@ -443,7 +443,7 @@ demo = gr.ChatInterface(
|
|
443 |
fn=generate_final_response,
|
444 |
examples=["Any updates on Polycab"],
|
445 |
chatbot=my_chatbot,
|
446 |
-
title='<span style="font-family: Helvetica; font-size: 40px; color: green;"
|
447 |
theme=theme,
|
448 |
js= js_func,
|
449 |
css = """.gradio-container {
|
|
|
363 |
yield output
|
364 |
except StopAsyncIteration:
|
365 |
yield "Sorry, could you provide more details to clarify your query"
|
366 |
+
except Exception as e:
|
367 |
+
yield f"Sorry, your query couldn't be processed. Retry with correct name of stock - An error occurred: {e}"
|
368 |
+
except Exception as e:
|
369 |
+
yield f"Connection couldn't be established with LLM, Model might be overloaded! - - An error occurred: {e}"
|
370 |
|
371 |
def generate_function_call(prompt):
|
372 |
# temperature = float(temperature)
|
|
|
443 |
fn=generate_final_response,
|
444 |
examples=["Any updates on Polycab"],
|
445 |
chatbot=my_chatbot,
|
446 |
+
title='<span style="font-family: Helvetica; font-size: 40px; color: green;">StockX</span>',
|
447 |
theme=theme,
|
448 |
js= js_func,
|
449 |
css = """.gradio-container {
|