Spaces:
Runtime error
Runtime error
base
Browse files- app.py +15 -0
- packages.txt +0 -0
- requirements.txt +9 -0
app.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import numpy as np
|
| 2 |
+
import gradio as gr
|
| 3 |
+
|
| 4 |
+
def sepia(input_img):
|
| 5 |
+
sepia_filter = np.array([
|
| 6 |
+
[0.393, 0.769, 0.189],
|
| 7 |
+
[0.349, 0.686, 0.168],
|
| 8 |
+
[0.272, 0.534, 0.131]
|
| 9 |
+
])
|
| 10 |
+
sepia_img = input_img.dot(sepia_filter.T)
|
| 11 |
+
sepia_img /= sepia_img.max()
|
| 12 |
+
return sepia_img
|
| 13 |
+
|
| 14 |
+
iface = gr.Interface(sepia, gr.Image(shape=(200, 200)), "image")
|
| 15 |
+
iface.launch()
|
packages.txt
ADDED
|
File without changes
|
requirements.txt
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# requirements.txt
|
| 2 |
+
torch==2.0.1
|
| 3 |
+
torchvision==0.15.2
|
| 4 |
+
torch-lr-finder==0.2.1
|
| 5 |
+
albumentations==1.3.1
|
| 6 |
+
torchsummary==1.5.1
|
| 7 |
+
grad-cam==1.4.8
|
| 8 |
+
pytorch_lightning==2.0.6
|
| 9 |
+
gradio==3.39.0
|