Update app.py
Browse files
app.py
CHANGED
@@ -65,7 +65,7 @@ try:
|
|
65 |
client = QdrantClient(
|
66 |
url=os.getenv("QDRANT_URL"),
|
67 |
api_key=os.getenv("QDRANT_API_KEY"),
|
68 |
-
prefer_grpc=
|
69 |
)
|
70 |
except Exception as e:
|
71 |
logger.error("Failed to connect to Qdrant. Ensure QDRANT_URL and QDRANT_API_KEY are correctly set.")
|
@@ -169,7 +169,7 @@ def create_rag_chain(chat_history: str):
|
|
169 |
chat_history = ChatHistory()
|
170 |
|
171 |
# Gradio Function
|
172 |
-
@spaces.GPU(
|
173 |
def ask_question_gradio(question, history):
|
174 |
try:
|
175 |
# Add user question to chat history
|
|
|
65 |
client = QdrantClient(
|
66 |
url=os.getenv("QDRANT_URL"),
|
67 |
api_key=os.getenv("QDRANT_API_KEY"),
|
68 |
+
prefer_grpc=False
|
69 |
)
|
70 |
except Exception as e:
|
71 |
logger.error("Failed to connect to Qdrant. Ensure QDRANT_URL and QDRANT_API_KEY are correctly set.")
|
|
|
169 |
chat_history = ChatHistory()
|
170 |
|
171 |
# Gradio Function
|
172 |
+
@spaces.GPU()
|
173 |
def ask_question_gradio(question, history):
|
174 |
try:
|
175 |
# Add user question to chat history
|