VIVEK JAYARAM
commited on
Commit
·
2ed8848
1
Parent(s):
70df83d
spaces gpu decorator
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
import torch
|
| 3 |
import yaml
|
| 4 |
import os
|
|
@@ -80,7 +81,7 @@ def generate_noisy_image(image_choice, noise_sigma, operator_key):
|
|
| 80 |
|
| 81 |
return noisy_image, data # Return the noisy image and data for restoration
|
| 82 |
|
| 83 |
-
|
| 84 |
def run_restoration(data, T, K):
|
| 85 |
"""Run the restoration process and return the restored image."""
|
| 86 |
global model, ddim_scheduler, model_type
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import spaces
|
| 3 |
import torch
|
| 4 |
import yaml
|
| 5 |
import os
|
|
|
|
| 81 |
|
| 82 |
return noisy_image, data # Return the noisy image and data for restoration
|
| 83 |
|
| 84 |
+
@spaces.GPU
|
| 85 |
def run_restoration(data, T, K):
|
| 86 |
"""Run the restoration process and return the restored image."""
|
| 87 |
global model, ddim_scheduler, model_type
|