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

21 lines
413 B
Python
Raw Normal View History

2023-11-15 13:12:06 +00:00
from threading import Thread
import worker
import server
if __name__ == '__main__':
# Start the worker thread
worker_thread = Thread(target=worker.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()