Spaces:
Build error
Build error
Commit ·
294c647
1
Parent(s): 194d48b
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,10 +45,7 @@ def visualize_diagram(input_text):
|
|
| 45 |
print (mermaid_code)
|
| 46 |
url = generate_diagram(mermaid_code[0])
|
| 47 |
print ("Url",url)
|
| 48 |
-
|
| 49 |
-
client = httpx.Client()
|
| 50 |
-
response = client.get(url)
|
| 51 |
-
img = Image.open(response.content)
|
| 52 |
print ("Image",img)
|
| 53 |
return img
|
| 54 |
|
|
|
|
| 45 |
print (mermaid_code)
|
| 46 |
url = generate_diagram(mermaid_code[0])
|
| 47 |
print ("Url",url)
|
| 48 |
+
img = Image.open(requests.get(url, headers={'content-type': 'image/png'},stream=True).raw)
|
|
|
|
|
|
|
|
|
|
| 49 |
print ("Image",img)
|
| 50 |
return img
|
| 51 |
|