Spaces:
Paused
Paused
updated
Browse files
app.py
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
import os
|
3 |
# # Run setup.sh script before starting the app
|
4 |
# subprocess.run(["/bin/bash", "setup.sh"], check=True)
|
5 |
-
os.system('pip install --upgrade pip')
|
6 |
-
os.system('apt-get update && apt-get install -y libmagic1')
|
7 |
-
os.system('pip install -U langchain-community')
|
8 |
-
os.system('pip install --upgrade accelerate')
|
9 |
-
os.system('pip install -i https://pypi.org/simple/ bitsandbytes --upgrade')
|
10 |
|
11 |
import gradio as gr
|
12 |
import spaces
|
@@ -86,7 +86,7 @@ books_db_client_retriever = RetrievalQA.from_chain_type(
|
|
86 |
)
|
87 |
|
88 |
# Function to retrieve answer using the RAG system
|
89 |
-
@spaces.GPU(duration=20)
|
90 |
def test_rag(query):
|
91 |
books_retriever = books_db_client_retriever.run(query)
|
92 |
|
|
|
2 |
import os
|
3 |
# # Run setup.sh script before starting the app
|
4 |
# subprocess.run(["/bin/bash", "setup.sh"], check=True)
|
5 |
+
# os.system('pip install --upgrade pip')
|
6 |
+
# os.system('apt-get update && apt-get install -y libmagic1')
|
7 |
+
# os.system('pip install -U langchain-community')
|
8 |
+
# os.system('pip install --upgrade accelerate')
|
9 |
+
# os.system('pip install -i https://pypi.org/simple/ bitsandbytes --upgrade')
|
10 |
|
11 |
import gradio as gr
|
12 |
import spaces
|
|
|
86 |
)
|
87 |
|
88 |
# Function to retrieve answer using the RAG system
|
89 |
+
@spaces.GPU #(duration=20)
|
90 |
def test_rag(query):
|
91 |
books_retriever = books_db_client_retriever.run(query)
|
92 |
|