Abhlash commited on
Commit
135d188
·
verified ·
1 Parent(s): d84123a
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -1,9 +1,13 @@
1
  import sys
2
  import os
3
- sys.path.append(os.path.dirname(os.path.abspath(__file__)))
 
 
 
 
4
 
5
  import gradio as gr
6
- from bots.chat import bot # Import the bot function from chat.py
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