MonkeyDBoa commited on
Commit
29a3b95
·
1 Parent(s): 1a05ac1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -13,16 +13,24 @@ import gradio as gr
13
  # Importing Image module from PIL package
14
  from PIL import Image
15
  import PIL
 
16
 
17
 
18
  def greet(name):
19
  test_image_path="geeks.jpg"
 
 
 
 
 
 
 
20
  # creating a image object (main image)
21
  im1 = Image.fromarray(name)
22
  # save a image using extension
23
  im1 = im1.save(test_image_path)
24
  test_image = face_recognition.load_image_file(test_image_path)
25
- return test_image
26
 
27
- iface = gr.Interface(fn=greet, inputs=gr.inputs.Image(), outputs="image")
28
  iface.launch()
 
13
  # Importing Image module from PIL package
14
  from PIL import Image
15
  import PIL
16
+ import pandas as pd
17
 
18
 
19
  def greet(name):
20
  test_image_path="geeks.jpg"
21
+
22
+ df=pd.read_csv("encodings.csv")
23
+ my_custom_list=df.values.tolist()
24
+
25
+ df2=pd.read_csv("names.csv")
26
+ my_custom_list2=df2.values.tolist()
27
+
28
  # creating a image object (main image)
29
  im1 = Image.fromarray(name)
30
  # save a image using extension
31
  im1 = im1.save(test_image_path)
32
  test_image = face_recognition.load_image_file(test_image_path)
33
+ return len(df)
34
 
35
+ iface = gr.Interface(fn=greet, inputs=gr.inputs.Image(), outputs="text")
36
  iface.launch()