Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -80,13 +80,14 @@ def get_caption_from_kosmos(image_in):
|
|
80 |
return truncated_caption
|
81 |
|
82 |
def get_caption(image_in):
|
83 |
-
|
|
|
84 |
result = client.predict(
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
api_name="/predict"
|
89 |
)
|
|
|
90 |
print(result)
|
91 |
return result
|
92 |
|
|
|
80 |
return truncated_caption
|
81 |
|
82 |
def get_caption(image_in):
|
83 |
+
|
84 |
+
client = Client("fffiloni/moondream1", hf_token=hf_token)
|
85 |
result = client.predict(
|
86 |
+
image=handle_file(image_in),
|
87 |
+
question="Describe precisely the image in one sentence.",
|
88 |
+
api_name="/predict"
|
|
|
89 |
)
|
90 |
+
|
91 |
print(result)
|
92 |
return result
|
93 |
|