Spaces:
Building
Building
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,3 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
|
3 |
import gradio as gr
|
4 |
import numpy as np
|
5 |
import matplotlib.pyplot as plt
|
@@ -11,7 +9,7 @@ from PIL import Image
|
|
11 |
|
12 |
def process_image(image):
|
13 |
# Orijinal görüntüyü işleme (grayscale'e çevirme)
|
14 |
-
image =
|
15 |
image = np.array(image)
|
16 |
|
17 |
# Sinogram oluşturma (projeksiyon verileri)
|
@@ -81,7 +79,7 @@ with gr.Blocks() as demo:
|
|
81 |
gpt2_button = gr.Button("GPT-2 Çalıştır")
|
82 |
|
83 |
with gr.Row():
|
84 |
-
image_input = gr.Image(type="
|
85 |
output = gr.HTML(label="Sonuçlar")
|
86 |
|
87 |
image_button = gr.Button("Görüntü İşle")
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
import matplotlib.pyplot as plt
|
|
|
9 |
|
10 |
def process_image(image):
|
11 |
# Orijinal görüntüyü işleme (grayscale'e çevirme)
|
12 |
+
image = image.convert("L") # Grayscale'e çevirme
|
13 |
image = np.array(image)
|
14 |
|
15 |
# Sinogram oluşturma (projeksiyon verileri)
|
|
|
79 |
gpt2_button = gr.Button("GPT-2 Çalıştır")
|
80 |
|
81 |
with gr.Row():
|
82 |
+
image_input = gr.Image(type="pil", label="Görüntü Yükle")
|
83 |
output = gr.HTML(label="Sonuçlar")
|
84 |
|
85 |
image_button = gr.Button("Görüntü İşle")
|