Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
35b6dc2
1
Parent(s):
174532a
update
Browse files- app.py +2 -0
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import os
|
| 2 |
import time
|
|
|
|
| 3 |
import gradio as gr
|
| 4 |
import torch as th
|
| 5 |
import torch
|
|
@@ -116,6 +117,7 @@ def calculate_dimensions(image, mod_value):
|
|
| 116 |
return calculated_width, calculated_height
|
| 117 |
|
| 118 |
|
|
|
|
| 119 |
def run_inference(
|
| 120 |
image_path: str,
|
| 121 |
prompt: str,
|
|
|
|
| 1 |
import os
|
| 2 |
import time
|
| 3 |
+
import spaces
|
| 4 |
import gradio as gr
|
| 5 |
import torch as th
|
| 6 |
import torch
|
|
|
|
| 117 |
return calculated_width, calculated_height
|
| 118 |
|
| 119 |
|
| 120 |
+
@spaces.GPU
|
| 121 |
def run_inference(
|
| 122 |
image_path: str,
|
| 123 |
prompt: str,
|
requirements.txt
CHANGED
|
@@ -17,6 +17,7 @@ numpy==1.26.4
|
|
| 17 |
pillow==11.1.0
|
| 18 |
qwen-vl-utils==0.0.14
|
| 19 |
gradio==5.49.1
|
|
|
|
| 20 |
|
| 21 |
# Progress bars
|
| 22 |
tqdm==4.67.1
|
|
|
|
| 17 |
pillow==11.1.0
|
| 18 |
qwen-vl-utils==0.0.14
|
| 19 |
gradio==5.49.1
|
| 20 |
+
spaces
|
| 21 |
|
| 22 |
# Progress bars
|
| 23 |
tqdm==4.67.1
|