Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -81,7 +81,7 @@ sample_data = {
|
|
| 81 |
response = requests.post("https://ldhldh-api-for-unity.hf.space/run/predict_7", json={
|
| 82 |
"data": [
|
| 83 |
]}).json()
|
| 84 |
-
|
| 85 |
|
| 86 |
print(sample_data)
|
| 87 |
|
|
@@ -164,6 +164,8 @@ class BubbleChart:
|
|
| 164 |
|
| 165 |
min_size = np.min(area)
|
| 166 |
max_size = np.max(area)
|
|
|
|
|
|
|
| 167 |
|
| 168 |
self.colors = self.quantize_colors(area, min_size, max_size, n_bins)
|
| 169 |
|
|
|
|
| 81 |
response = requests.post("https://ldhldh-api-for-unity.hf.space/run/predict_7", json={
|
| 82 |
"data": [
|
| 83 |
]}).json()
|
| 84 |
+
sample_data = eval(response["data"][0])
|
| 85 |
|
| 86 |
print(sample_data)
|
| 87 |
|
|
|
|
| 164 |
|
| 165 |
min_size = np.min(area)
|
| 166 |
max_size = np.max(area)
|
| 167 |
+
if min_size == max_size:
|
| 168 |
+
min_size = max_size//2
|
| 169 |
|
| 170 |
self.colors = self.quantize_colors(area, min_size, max_size, n_bins)
|
| 171 |
|