Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
import json
|
3 |
import re
|
4 |
from gradio_client import Client
|
@@ -97,6 +98,7 @@ instruction = f"""
|
|
97 |
<|user|>
|
98 |
"""
|
99 |
|
|
|
100 |
def infer(image_in):
|
101 |
gr.Info("Getting image caption with Kosmos2...")
|
102 |
user_prompt = get_caption_from_MD(image_in)
|
|
|
1 |
import gradio as gr
|
2 |
+
import spaces
|
3 |
import json
|
4 |
import re
|
5 |
from gradio_client import Client
|
|
|
98 |
<|user|>
|
99 |
"""
|
100 |
|
101 |
+
@spaces.GPU(enable_queue=True)
|
102 |
def infer(image_in):
|
103 |
gr.Info("Getting image caption with Kosmos2...")
|
104 |
user_prompt = get_caption_from_MD(image_in)
|