Spaces:
Sleeping
Sleeping
refactor: polish alfred_response value
Browse files
app.py
CHANGED
@@ -4,7 +4,6 @@ import pandas as pd
|
|
4 |
import requests
|
5 |
import os
|
6 |
from matplotlib.image import imread
|
7 |
-
from ast import literal_eval
|
8 |
|
9 |
|
10 |
# hf ์ secret ์ผ๋ก ์ค์ , ๋ก์ปฌ ํ
์คํธ์์๋ ๋ด๋ถ ip ์ฌ์ฉ
|
@@ -67,7 +66,8 @@ with gr.Blocks() as demo:
|
|
67 |
f"{ALFRED_URL}/hf_demo/alfred", params={"ecg_id": ecg_id}, timeout=600
|
68 |
)
|
69 |
alfred_response.raise_for_status()
|
70 |
-
|
|
|
71 |
|
72 |
image_response = requests.post(
|
73 |
f"{ALFRED_URL}/hf_demo/ptbxl_to_image",
|
|
|
4 |
import requests
|
5 |
import os
|
6 |
from matplotlib.image import imread
|
|
|
7 |
|
8 |
|
9 |
# hf ์ secret ์ผ๋ก ์ค์ , ๋ก์ปฌ ํ
์คํธ์์๋ ๋ด๋ถ ip ์ฌ์ฉ
|
|
|
66 |
f"{ALFRED_URL}/hf_demo/alfred", params={"ecg_id": ecg_id}, timeout=600
|
67 |
)
|
68 |
alfred_response.raise_for_status()
|
69 |
+
res = alfred_response.json()
|
70 |
+
alfred_result = res.get("answer")
|
71 |
|
72 |
image_response = requests.post(
|
73 |
f"{ALFRED_URL}/hf_demo/ptbxl_to_image",
|