Spaces:
Runtime error
Runtime error
linjieccc
commited on
Commit
•
3d14c7f
1
Parent(s):
05f882f
update
Browse files
app.py
CHANGED
@@ -237,7 +237,7 @@ def process_prompt(prompt, document, lang="ch"):
|
|
237 |
|
238 |
url = f"https://aip.baidubce.com/rpc/2.0/nlp-itec/poc/docprompt?access_token={access_token}"
|
239 |
|
240 |
-
r = requests.post(url, json={"doc": img_base64(document), "prompt": [prompt], "lang": lang})
|
241 |
response = r.json()
|
242 |
|
243 |
predictions = response['result']
|
|
|
237 |
|
238 |
url = f"https://aip.baidubce.com/rpc/2.0/nlp-itec/poc/docprompt?access_token={access_token}"
|
239 |
|
240 |
+
r = requests.post(url, json={"doc": img_base64(document).decode(), "prompt": [prompt], "lang": lang})
|
241 |
response = r.json()
|
242 |
|
243 |
predictions = response['result']
|