angelesteban00 commited on
Commit
a1adb2d
1 Parent(s): 10d3d0d
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +6 -4
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: RAG with enrich answer \n MongoDB Atlas Vector Search + OpenAI
3
  emoji: 🦀
4
  colorFrom: purple
5
  colorTo: red
 
1
  ---
2
+ title: RAG - MongoDB Atlas Vector Search & OpenAI
3
  emoji: 🦀
4
  colorFrom: purple
5
  colorTo: red
app.py CHANGED
@@ -13,6 +13,11 @@ from gradio.themes.base import Base
13
  #import key_param
14
  import os
15
 
 
 
 
 
 
16
  def query_data(query,openai_api_key,mongo_uri):
17
  os.environ["OPENAI_API_KEY"] = openai_api_key
18
  os.environ["MONGO_URI"] = mongo_uri
@@ -64,10 +69,7 @@ def query_data(query,openai_api_key,mongo_uri):
64
  # Create a web interface for the app, using Gradio
65
 
66
  with gr.Blocks(theme=Base(), title="MongoDB Atlas Vector Search + RAG Architecture") as demo:
67
- gr.Markdown(
68
- """
69
- # MongoDB Atlas Vector Search + RAG Architecture
70
- """)
71
  openai_api_key = gr.Textbox(label = "OpenAI API Key (sk-...)", type = "password", lines = 1)
72
  mongo_uri = gr.Textbox(label = "Mongo Atlas URI (mongodb+srv://..)", type = "password", lines = 1)
73
  textbox = gr.Textbox(label="Enter your Question:")
 
13
  #import key_param
14
  import os
15
 
16
+ DESCRIPTION = """\
17
+ # RAG - MongoDB Atlas Vector Search & OpenAI
18
+ This app is designed to provide a simple chat where to improve the answer from OpenAI with private information located in MongoDB Atlas cluster.
19
+ """
20
+
21
  def query_data(query,openai_api_key,mongo_uri):
22
  os.environ["OPENAI_API_KEY"] = openai_api_key
23
  os.environ["MONGO_URI"] = mongo_uri
 
69
  # Create a web interface for the app, using Gradio
70
 
71
  with gr.Blocks(theme=Base(), title="MongoDB Atlas Vector Search + RAG Architecture") as demo:
72
+ gr.Markdown(DESCRIPTION)
 
 
 
73
  openai_api_key = gr.Textbox(label = "OpenAI API Key (sk-...)", type = "password", lines = 1)
74
  mongo_uri = gr.Textbox(label = "Mongo Atlas URI (mongodb+srv://..)", type = "password", lines = 1)
75
  textbox = gr.Textbox(label="Enter your Question:")