Spaces:
Sleeping
Sleeping
Download src/agents/image_explainer/func.py from ABAO77/LinhMeGauu2: direct link, hf CLI and curl.
- Browser
- Download file 345 Bytes
-
https://huggingface.co/spaces/ABAO77/LinhMeGauu2/resolve/main/src/agents/image_explainer/func.py
- Command line
-
hf download hf://spaces/ABAO77/LinhMeGauu2/src/agents/image_explainer/func.py
-
curl -L -o func.py https://huggingface.co/spaces/ABAO77/LinhMeGauu2/resolve/main/src/agents/image_explainer/func.py
345 Bytes
| from typing import TypedDict | |
| from .prompt import chain | |
| class State(TypedDict): | |
| pass | |
| async def image_explainer(base64_image, domain, topic, question): | |
| response = await chain.ainvoke({ | |
| "base64_image": base64_image, | |
| "domain": domain, | |
| "topic": topic, | |
| "question": question | |
| }) | |
| return response.content |