Jayahae commited on
Commit
52cb838
1 Parent(s): f8be95f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -5,7 +5,7 @@ from io import BytesIO
5
  import numpy as np
6
 
7
  # Load the image from the URL
8
- input_image_url = "https://raw.githubusercontent.com/xoghd1126/G4-finalproject/main/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C1.PNG"
9
  response = requests.get(input_image_url)
10
  image = Image.open(BytesIO(response.content))
11
 
@@ -13,20 +13,20 @@ image = Image.open(BytesIO(response.content))
13
  image_np = np.array(image)
14
 
15
  # URL of the output image
16
- output_image_url = "https://raw.githubusercontent.com/xoghd1126/G4-finalproject/main/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C2.png"
17
 
18
  # Function to process the drawing (dummy processing)
19
  def process_drawing(drawing):
20
  # Fetch the output image
21
  response = requests.get(output_image_url)
22
  output_image = Image.open(BytesIO(response.content))
23
-
24
  return output_image
25
 
26
  # Create Gradio interface
27
  def create_interface():
28
  sketchpad = gr.Sketchpad(label="Draw lines to match items", type="numpy", value=image_np)
29
-
30
  interface = gr.Interface(
31
  fn=process_drawing,
32
  inputs=[sketchpad],
 
5
  import numpy as np
6
 
7
  # Load the image from the URL
8
+ input_image_url = "https://raw.githubusercontent.com/xoghd1126/G4-finalproject/main/Slide-1.png"
9
  response = requests.get(input_image_url)
10
  image = Image.open(BytesIO(response.content))
11
 
 
13
  image_np = np.array(image)
14
 
15
  # URL of the output image
16
+ output_image_url = "https://raw.githubusercontent.com/xoghd1126/G4-finalproject/main/Slide-2.png"
17
 
18
  # Function to process the drawing (dummy processing)
19
  def process_drawing(drawing):
20
  # Fetch the output image
21
  response = requests.get(output_image_url)
22
  output_image = Image.open(BytesIO(response.content))
23
+
24
  return output_image
25
 
26
  # Create Gradio interface
27
  def create_interface():
28
  sketchpad = gr.Sketchpad(label="Draw lines to match items", type="numpy", value=image_np)
29
+
30
  interface = gr.Interface(
31
  fn=process_drawing,
32
  inputs=[sketchpad],