princhman commited on
Commit
a7e16c8
·
1 Parent(s): ae9e9b0

Resolve starting error

Browse files
__pycache__/inference_svm_model.cpython-310.pyc CHANGED
Binary files a/__pycache__/inference_svm_model.cpython-310.pyc and b/__pycache__/inference_svm_model.cpython-310.pyc differ
 
__pycache__/mineru_single.cpython-310.pyc CHANGED
Binary files a/__pycache__/mineru_single.cpython-310.pyc and b/__pycache__/mineru_single.cpython-310.pyc differ
 
app.py CHANGED
@@ -35,7 +35,7 @@ async def process_pdf(
35
  raise HTTPException(status_code=401, detail="Invalid API key")
36
 
37
  # Connect to RabbitMQ
38
- rabbit_url = os.getenv("RABBITMQ_URL", "amqp://guest:guest@localhost:5672/")
39
  connection = pika.BlockingConnection(pika.URLParameters(rabbit_url))
40
  channel = connection.channel()
41
  channel.queue_declare(queue="ml_server", durable=True)
 
35
  raise HTTPException(status_code=401, detail="Invalid API key")
36
 
37
  # Connect to RabbitMQ
38
+ rabbit_url = os.getenv("RABBITMQ_URL")
39
  connection = pika.BlockingConnection(pika.URLParameters(rabbit_url))
40
  channel = connection.channel()
41
  channel.queue_declare(queue="ml_server", durable=True)
launch.sh ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ echo "Setting up requirements"
3
+
4
+ python download_models_hf.py
5
+
6
+ python app.py # or uvicorn app:app --host 0.0.0.0 --port 7860