BuildNg commited on
Commit
54c5b76
·
1 Parent(s): 790c2d1
Files changed (3) hide show
  1. app.py +1 -1
  2. demo_client.py +1 -6
  3. rag.py +1 -3
app.py CHANGED
@@ -40,4 +40,4 @@ app = gr.mount_gradio_app(api, demo, path="/")
40
  # ---------- Local debugging ----------
41
  if __name__ == "__main__":
42
  import uvicorn
43
- uvicorn.run(app, host="0.0.0.0", port=7860)
 
40
  # ---------- Local debugging ----------
41
  if __name__ == "__main__":
42
  import uvicorn
43
+ uvicorn.run(app, host="0.0.0.0", port=7860)
demo_client.py CHANGED
@@ -1,18 +1,13 @@
1
  #!/usr/bin/env python3
2
  """
3
  Simple CLI for the Moffitt RAG Space.
4
-
5
  Before running, run the following on your terminal:
6
  pip install requests python-dotenv
7
-
8
  Then, in the same folder as this file demo_client.py, create a file named .env
9
  Add in it the following line
10
-
11
  RAG_API_KEY=password (replace the actual password here, no "" symbols needed)
12
-
13
  Usage:
14
  python demo_client.py "What are the common types of cancer" -k 5
15
-
16
  Environment variables:
17
  RAG_API_KEY Your X-API-Key header value (e.g. "alpha")
18
  RAG_API_URL (optional) override the default Space URL
@@ -63,4 +58,4 @@ call_rag_api(question, k, DEFAULT_URL)
63
  question is a string, your question, like "what is the risk of blood bone marrow transplant?"
64
  k is an integer. Keep it a small integer (<10)
65
  DEFAULT_URL is the variable above
66
- """
 
1
  #!/usr/bin/env python3
2
  """
3
  Simple CLI for the Moffitt RAG Space.
 
4
  Before running, run the following on your terminal:
5
  pip install requests python-dotenv
 
6
  Then, in the same folder as this file demo_client.py, create a file named .env
7
  Add in it the following line
 
8
  RAG_API_KEY=password (replace the actual password here, no "" symbols needed)
 
9
  Usage:
10
  python demo_client.py "What are the common types of cancer" -k 5
 
11
  Environment variables:
12
  RAG_API_KEY Your X-API-Key header value (e.g. "alpha")
13
  RAG_API_URL (optional) override the default Space URL
 
58
  question is a string, your question, like "what is the risk of blood bone marrow transplant?"
59
  k is an integer. Keep it a small integer (<10)
60
  DEFAULT_URL is the variable above
61
+ """
rag.py CHANGED
@@ -41,6 +41,4 @@ demo = gr.Interface(
41
  outputs=[
42
  gr.Textbox(label="Output from DenseRetriever", lines=25),
43
  ],
44
- )
45
-
46
-
 
41
  outputs=[
42
  gr.Textbox(label="Output from DenseRetriever", lines=25),
43
  ],
44
+ )