Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
from gradio_client import Client
|
3 |
|
4 |
#fusecap_client = Client("https://noamrot-fusecap-image-captioning.hf.space/")
|
@@ -22,6 +23,10 @@ def get_caption(image_in):
|
|
22 |
|
23 |
print(f"KOSMOS2 RETURNS: {kosmos2_result}")
|
24 |
|
|
|
|
|
|
|
|
|
25 |
# Find the last occurrence of "."
|
26 |
last_period_index = kosmos2_result[1].rfind('.')
|
27 |
|
|
|
1 |
import gradio as gr
|
2 |
+
import json
|
3 |
from gradio_client import Client
|
4 |
|
5 |
#fusecap_client = Client("https://noamrot-fusecap-image-captioning.hf.space/")
|
|
|
23 |
|
24 |
print(f"KOSMOS2 RETURNS: {kosmos2_result}")
|
25 |
|
26 |
+
with open(kosmos2_result[1], 'r') as f:
|
27 |
+
data = json.load(f)
|
28 |
+
print(data)
|
29 |
+
|
30 |
# Find the last occurrence of "."
|
31 |
last_period_index = kosmos2_result[1].rfind('.')
|
32 |
|