Spaces:
Sleeping
Sleeping
| from gradio_client import Client | |
| import logging | |
| import os | |
| LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") | |
| logging.basicConfig(level=LOG_LEVEL) | |
| logger = logging.getLogger(__name__) | |
| client = Client("https://batmac-captioner.hf.space/") | |
| print(client.view_api()) | |
| result = client.predict( | |
| "https://images.pexels.com/photos/58997/pexels-photo-58997.jpeg", # str in 'image_url' Textbox component | |
| api_name="/predict" | |
| ) | |
| print(result) | |