Spaces:
Sleeping
Sleeping
Create FROM-API
Browse files
FROM-API
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from gradio_client import Client, handle_file
|
2 |
+
|
3 |
+
client = Client("Priyanshi3/blip-image-captionin-api")
|
4 |
+
result = client.predict(
|
5 |
+
input=handle_file('https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png'),
|
6 |
+
api_name="/predict"
|
7 |
+
)
|
8 |
+
print(result)
|