Spaces:
Sleeping
Sleeping
Update app.py
Browse filesAdded condition
app.py
CHANGED
|
@@ -68,6 +68,10 @@ def chatbot(user_input,history_state,temprature_slider, session_id=str(uuid.uui
|
|
| 68 |
Function to handle user input and generate a response.
|
| 69 |
It maintains the session history and returns the response.
|
| 70 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
llm.temperature = temprature_slider # Set the temperature for the model
|
| 72 |
|
| 73 |
response = chain.invoke(
|
|
|
|
| 68 |
Function to handle user input and generate a response.
|
| 69 |
It maintains the session history and returns the response.
|
| 70 |
"""
|
| 71 |
+
|
| 72 |
+
if(user_input.strip() == ""):
|
| 73 |
+
return "Please enter a valid question."
|
| 74 |
+
|
| 75 |
llm.temperature = temprature_slider # Set the temperature for the model
|
| 76 |
|
| 77 |
response = chain.invoke(
|