YannisK commited on
Commit
1a2db09
1 Parent(s): f2f0d51
Files changed (1) hide show
  1. app.py +32 -35
app.py CHANGED
@@ -3,43 +3,40 @@ import gradio as gr
3
  def greet(name):
4
  return "Hello " + name + "!!"
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
8
-
9
 
10
- # # Model to use
11
- # net_path = 'fire.pth'
12
 
13
- # # CPU / GPU
14
- # device = 'cpu'
15
 
16
- # # Images will be downscaled to this size prior processing with the network
17
- # image_size = 1024
18
 
19
- # # Wrapper
20
- # def generate_matching_superfeatures(im1, im2, scale=6):
21
 
22
- # # Possible Scales for multiscale inference
23
- # scales = [2.0, 1.414, 1.0, 0.707, 0.5, 0.353, 0.25]
24
-
25
-
26
- # # GRADIO APP
27
- # title = "Visualizing Super-features"
28
- # description = "TBD"
29
- # article = "<p style='text-align: center'><a href='https://github.com/naver/fire' target='_blank'>Original Github Repo</a></p>"
30
-
31
-
32
- # iface = gr.Interface(
33
- # fn=generate_matching_superfeatures,
34
- # inputs=[
35
- # gr.inputs.Image(shape=(240, 240), type="pil"),
36
- # gr.inputs.Image(shape=(240, 240), type="pil"),
37
- # gr.inputs.Slider(minimum=1, maximum=7, step=1, default=2, label="Scale")],
38
- # outputs="plot",
39
- # enable_queue=True,
40
- # title=title,
41
- # description=description,
42
- # article=article,
43
- # examples=[["chateau_1.png", "chateau_2.png", 6]],
44
- # )
45
- # iface.launch()
 
3
  def greet(name):
4
  return "Hello " + name + "!!"
5
 
 
 
 
6
 
7
+ # Model to use
8
+ net_path = 'fire.pth'
9
 
10
+ # CPU / GPU
11
+ device = 'cpu'
12
 
13
+ # Images will be downscaled to this size prior processing with the network
14
+ image_size = 1024
15
 
16
+ # Wrapper
17
+ def generate_matching_superfeatures(im1, im2, scale=6):
18
 
19
+ # Possible Scales for multiscale inference
20
+ scales = [2.0, 1.414, 1.0, 0.707, 0.5, 0.353, 0.25]
21
+
22
+
23
+ # GRADIO APP
24
+ title = "Visualizing Super-features"
25
+ description = "TBD"
26
+ article = "<p style='text-align: center'><a href='https://github.com/naver/fire' target='_blank'>Original Github Repo</a></p>"
27
+
28
+
29
+ iface = gr.Interface(
30
+ fn=generate_matching_superfeatures,
31
+ inputs=[
32
+ gr.inputs.Image(shape=(240, 240), type="pil"),
33
+ gr.inputs.Image(shape=(240, 240), type="pil"),
34
+ gr.inputs.Slider(minimum=1, maximum=7, step=1, default=2, label="Scale")],
35
+ outputs="plot",
36
+ enable_queue=True,
37
+ title=title,
38
+ description=description,
39
+ article=article,
40
+ examples=[["chateau_1.png", "chateau_2.png", 6]],
41
+ )
42
+ iface.launch()