prath commited on
Commit
c4e19e5
·
1 Parent(s): 942a67b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py CHANGED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import tensorflow as tf
2
+ import gradio as gr
3
+
4
+
5
+ model = tf.keras.models.load_model('model.h5')
6
+
7
+ def enhance_image(input_image):
8
+ # Process the input image using the loaded model
9
+ output_image = model.predict(input_image)
10
+ # Return the output image
11
+ return output_image
12
+
13
+ iface = gr.Interface(
14
+ fn=enhance_image,
15
+ inputs=gr.inputs.Image(),
16
+ outputs=gr.outputs.Image(),
17
+ title='Image Enhancement',
18
+ description='Enhance images using a TensorFlow model',
19
+ theme='default'
20
+ )
21
+ iface.launch()