langchain-chat-with-milvus/document_ai/run.py

21 lines
420 B
Python

from threading import Thread, Event
import vector
import server
if __name__ == '__main__':
# Start the worker thread
worker_thread = Thread(target=vector.sync_documents, args=())
worker_thread.start()
# Start the server thread
server_thread = Thread(target=server.serve, args=())
server_thread.start()
# Wait for the threads to finish
worker_thread.join()
server_thread.join()