Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,19 +32,4 @@ def chatbot(messages):
|
|
32 |
return messages
|
33 |
except Exception as e:
|
34 |
# Capture the specific error message for debugging
|
35 |
-
print
|
36 |
-
messages.append((None, f"An error occurred: {str(e)}")) # Show the error in chat as a tuple
|
37 |
-
return messages
|
38 |
-
|
39 |
-
# Function to reset the chat
|
40 |
-
def reset_chat():
|
41 |
-
return []
|
42 |
-
|
43 |
-
# Gradio interface with a chatbot component
|
44 |
-
with gr.Blocks(theme=gr.themes.Soft()) as iface:
|
45 |
-
gr.Markdown(
|
46 |
-
"""
|
47 |
-
# Real-Time Text-to-Text Chatbot
|
48 |
-
**by ATIF MEHMOOD**
|
49 |
-
|
50 |
-
|
|
|
32 |
return messages
|
33 |
except Exception as e:
|
34 |
# Capture the specific error message for debugging
|
35 |
+
print
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|