dog commited on
Commit
a214742
·
1 Parent(s): 0d7d883

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -22
main.py CHANGED
@@ -17,28 +17,8 @@ Check out the docs for the `/predict` endpoint below to try it out!
17
 
18
  #### Python
19
 
20
- ```python
21
- import requests
22
-
23
- url = "https://dog-fastapi-document-qa.hf.space/predict"
24
- r = requests.get(
25
- url,
26
- files={"image_file": open("invoice.png", "rb")},
27
- data={"question": "What is the invoice number?"}
28
- )
29
- print(r.json())
30
- ```
31
-
32
- #### Curl
33
-
34
- ```bash
35
- curl -X 'POST' \
36
- 'https://dog-fastapi-document-qa.hf.space/predict' \
37
- -H 'accept: application/json' \
38
- -H 'Content-Type: multipart/form-data' \
39
- -F '[email protected];type=image/png' \
40
- -F 'question=What is the invoice number?'
41
- ```
42
  """
43
 
44
  # NOTE - we configure docs_url to serve the interactive Docs at the root path
 
17
 
18
  #### Python
19
 
20
+ ![Python Snippet](./use_api_in_python.jpg)
21
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  """
23
 
24
  # NOTE - we configure docs_url to serve the interactive Docs at the root path