Daemontatox commited on
Commit
e90736c
·
verified ·
1 Parent(s): 7fa65bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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=True
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(600)
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