breezedeus / Pix2Text

An Open-Source Python3 tool with SMALL models for recognizing layouts, tables, math formulas (LaTeX), and text in images, converting them into Markdown format. A free alternative to Mathpix, empowering seamless conversion of visual content into text-based representations. 80+ languages are supported.
https://p2t.breezedeus.com
MIT License
1.99k stars 191 forks source link

Couldn't connect to server #147

Open xiaoxstz opened 1 month ago

xiaoxstz commented 1 month ago

Envrionment

Description

I take the steps according to the official document command

Firstly, I run it as an HTTP server with the command below

p2t serve -l en,ch_sim -H 0.0.0.0 -p 8503

The output is below.

INFO:     Started server process [21464]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8503 (Press CTRL+C to quit)

Secondly, I run the command below. Then, I saw the error Couldn't connect to server

(base) PS D:\Desktop> curl -X POST -F "file_type=page" -F "resized_shape=768" -F "embed_sep= $,$ " -F "isolated_sep=$$\n, \n$$" -F "image=@./1.jpg;type=image/jpeg" http://0.0.0.0:8503/pix2text

curl: (7) Failed to connect to 0.0.0.0 port 8503 after 0 ms: Couldn't connect to server
breezedeus commented 1 month ago

The calling method may be different in the Windows environment. You can search for how to use it in the command line.