Rename gradio_served1.py to app.py
Browse files- gradio_served1.py → app.py +1 -15
gradio_served1.py → app.py
RENAMED
|
@@ -1,20 +1,6 @@
|
|
| 1 |
-
import
|
| 2 |
-
import sys
|
| 3 |
-
|
| 4 |
import gradio as gr
|
| 5 |
|
| 6 |
-
# Get the directory of the current script
|
| 7 |
-
current_dir = os.path.dirname(__file__)
|
| 8 |
-
|
| 9 |
-
# Move up to the parent directory and then to the cousin folder
|
| 10 |
-
cousin_folder = os.path.join(current_dir, "..", "b1_rag_fns")
|
| 11 |
-
|
| 12 |
-
# Add cousin folder to sys.path so it can be imported
|
| 13 |
-
sys.path.append(os.path.abspath(cousin_folder))
|
| 14 |
-
|
| 15 |
-
from b1_all_rag_fns import do_rag
|
| 16 |
-
from dotenv import load_dotenv
|
| 17 |
-
|
| 18 |
|
| 19 |
def gr_ch_if(user_input: str, history):
|
| 20 |
oai_api_key = os.getenv("OPENAI_API_KEY")
|
|
|
|
| 1 |
+
from all_rag_fns import do_rag
|
|
|
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
def gr_ch_if(user_input: str, history):
|
| 6 |
oai_api_key = os.getenv("OPENAI_API_KEY")
|