Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ Home delivery robots: Use autonomous delivery robots to deliver biscuits directl
|
|
38 |
###
|
39 |
"""
|
40 |
|
41 |
-
|
42 |
headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
|
43 |
url_decodemprompts='https://us-central1-createinsightsproject.cloudfunctions.net/getdecodemprompts'
|
44 |
|
@@ -47,12 +47,13 @@ try:
|
|
47 |
r = requests.post(url_decodemprompts, data=json.dumps(data), headers=headers)
|
48 |
except requests.exceptions.ReadTimeout as e:
|
49 |
print(e)
|
50 |
-
print(r.content)
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
-
prompt=str(r.content)
|
53 |
-
prompt=prompt.split('\n')
|
54 |
-
prompt="\n".join(prompt)
|
55 |
-
"""
|
56 |
|
57 |
def infer(prompt,
|
58 |
max_length = 250,
|
|
|
38 |
###
|
39 |
"""
|
40 |
|
41 |
+
|
42 |
headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
|
43 |
url_decodemprompts='https://us-central1-createinsightsproject.cloudfunctions.net/getdecodemprompts'
|
44 |
|
|
|
47 |
r = requests.post(url_decodemprompts, data=json.dumps(data), headers=headers)
|
48 |
except requests.exceptions.ReadTimeout as e:
|
49 |
print(e)
|
50 |
+
#print(r.content)
|
51 |
+
|
52 |
+
prompt=str(r.content, 'UTF-8')
|
53 |
+
#prompt=prompt.split('\n')
|
54 |
+
#prompt="\n".join(prompt)
|
55 |
+
print(prompt)
|
56 |
|
|
|
|
|
|
|
|
|
57 |
|
58 |
def infer(prompt,
|
59 |
max_length = 250,
|