Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -14,6 +14,8 @@ model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
|
14 |
processor = AutoProcessor.from_pretrained(local_path)
|
15 |
|
16 |
# Function to process image and text and generate the output
|
|
|
|
|
17 |
def generate_output(image, text, button_click):
|
18 |
# Prepare input data
|
19 |
messages = [
|
|
|
14 |
processor = AutoProcessor.from_pretrained(local_path)
|
15 |
|
16 |
# Function to process image and text and generate the output
|
17 |
+
@torch.inference_mode()
|
18 |
+
@spaces.GPU(duration=120) # Specify a duration to avoid timeout
|
19 |
def generate_output(image, text, button_click):
|
20 |
# Prepare input data
|
21 |
messages = [
|