app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
| 1 |
import sys
|
| 2 |
import os
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
import gradio as gr
|
| 6 |
-
from bots.chat import bot #
|
| 7 |
|
| 8 |
def chat_interface(user_message, history):
|
| 9 |
history.append((user_message, None)) # Append the user message to history
|
|
|
|
| 1 |
import sys
|
| 2 |
import os
|
| 3 |
+
|
| 4 |
+
# Add the parent directory to the Python path
|
| 5 |
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
| 6 |
+
parent_dir = os.path.dirname(current_dir)
|
| 7 |
+
sys.path.append(parent_dir)
|
| 8 |
|
| 9 |
import gradio as gr
|
| 10 |
+
from app.bots.chat import bot # Use absolute import
|
| 11 |
|
| 12 |
def chat_interface(user_message, history):
|
| 13 |
history.append((user_message, None)) # Append the user message to history
|