Spaces:
Sleeping
Sleeping
Update agent/image_symptom_tool.py
Browse files
agent/image_symptom_tool.py
CHANGED
|
@@ -8,7 +8,7 @@ vision_client = Client(VISION_SPACE_URL)
|
|
| 8 |
|
| 9 |
|
| 10 |
@tool
|
| 11 |
-
def analyze_symptom_image(
|
| 12 |
"""
|
| 13 |
Calls Nivra Vision Diagnosis Gradio Space using image URL
|
| 14 |
Returns structured JSON string.
|
|
@@ -16,7 +16,7 @@ def analyze_symptom_image(image_url: str) -> str:
|
|
| 16 |
try:
|
| 17 |
result = vision_client.predict(
|
| 18 |
image_upload=None,
|
| 19 |
-
image_url=
|
| 20 |
top_k=2,
|
| 21 |
api_name="/predict"
|
| 22 |
)
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
@tool
|
| 11 |
+
def analyze_symptom_image(img_url: str) -> str:
|
| 12 |
"""
|
| 13 |
Calls Nivra Vision Diagnosis Gradio Space using image URL
|
| 14 |
Returns structured JSON string.
|
|
|
|
| 16 |
try:
|
| 17 |
result = vision_client.predict(
|
| 18 |
image_upload=None,
|
| 19 |
+
image_url=img_url,
|
| 20 |
top_k=2,
|
| 21 |
api_name="/predict"
|
| 22 |
)
|