Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from huggingface_hub import InferenceClient
|
|
4 |
|
5 |
client = InferenceClient("models/microsoft/trocr-base-handwritten")
|
6 |
|
7 |
-
|
8 |
|
9 |
def sepia(input_img):
|
10 |
sepia_filter = np.array([
|
@@ -14,7 +14,6 @@ def sepia(input_img):
|
|
14 |
])
|
15 |
sepia_img = input_img.dot(sepia_filter.T)
|
16 |
sepia_img /= sepia_img.max()
|
17 |
-
sepia_value = sepia_img
|
18 |
return sepia_img
|
19 |
|
20 |
|
@@ -33,7 +32,7 @@ with gr.Blocks() as generated_output:
|
|
33 |
with gr.Column():
|
34 |
gr.Interface(sepia, gr.Image(), "image")
|
35 |
with gr.Row():
|
36 |
-
gr.Textbox(
|
37 |
|
38 |
#with gr.Blocks() as generated_output:
|
39 |
# inp = gr.Interface(sepia, gr.Image(), "image")
|
|
|
4 |
|
5 |
client = InferenceClient("models/microsoft/trocr-base-handwritten")
|
6 |
|
7 |
+
sepia_img
|
8 |
|
9 |
def sepia(input_img):
|
10 |
sepia_filter = np.array([
|
|
|
14 |
])
|
15 |
sepia_img = input_img.dot(sepia_filter.T)
|
16 |
sepia_img /= sepia_img.max()
|
|
|
17 |
return sepia_img
|
18 |
|
19 |
|
|
|
32 |
with gr.Column():
|
33 |
gr.Interface(sepia, gr.Image(), "image")
|
34 |
with gr.Row():
|
35 |
+
gr.Textbox(sepia_img, label="Sepia values")
|
36 |
|
37 |
#with gr.Blocks() as generated_output:
|
38 |
# inp = gr.Interface(sepia, gr.Image(), "image")
|