nikzarifie commited on
Commit
c61d690
1 Parent(s): 8e13ce3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -9,8 +9,8 @@ BEGIN:VCARD
9
  VERSION:3.0
10
  FN:{name}
11
  TEL;TYPE=WORK,VOICE:{contact_number_work}
12
- TEL;TYPE=MOBILE,VOICE:{contact_number_mobile}
13
- EMAIL;TYPE=PREF,INTERNET:{email}
14
  TITLE:{designation}
15
  URL:{website}
16
  ADR;TYPE=WORK:;;{work_address}
@@ -34,7 +34,7 @@ END:VCARD
34
 
35
  return Image.open(buffer)
36
 
37
- def create_business_card(name, contact_number_work, contact_number_mobile, email, designation, website, work_address, user_image):
38
  qr_code_img = generate_vcard(name, contact_number_work, contact_number_mobile, email, designation, website, work_address)
39
 
40
  card_width, card_height = 600, 300
@@ -43,7 +43,7 @@ def create_business_card(name, contact_number_work, contact_number_mobile, email
43
 
44
  try:
45
  # Load and resize the user image
46
- user_image = Image.open(user_image).convert("RGBA")
47
  user_image = user_image.resize((150, 150), Image.ANTIALIAS)
48
  card.paste(user_image, (20, 75), user_image)
49
  except Exception as e:
@@ -85,4 +85,4 @@ iface = gr.Interface(
85
  description="Fill in your details, upload an image, and generate a business card with a QR code containing your information."
86
  )
87
 
88
- iface.launch()
 
9
  VERSION:3.0
10
  FN:{name}
11
  TEL;TYPE=WORK,VOICE:{contact_number_work}
12
+ TEL;TYPE=CELL:{contact_number_mobile}
13
+ EMAIL;TYPE=INTERNET:{email}
14
  TITLE:{designation}
15
  URL:{website}
16
  ADR;TYPE=WORK:;;{work_address}
 
34
 
35
  return Image.open(buffer)
36
 
37
+ def create_business_card(name, contact_number_work, contact_number_mobile, email, designation, website, work_address, user_image_path):
38
  qr_code_img = generate_vcard(name, contact_number_work, contact_number_mobile, email, designation, website, work_address)
39
 
40
  card_width, card_height = 600, 300
 
43
 
44
  try:
45
  # Load and resize the user image
46
+ user_image = Image.open(user_image_path).convert("RGBA")
47
  user_image = user_image.resize((150, 150), Image.ANTIALIAS)
48
  card.paste(user_image, (20, 75), user_image)
49
  except Exception as e:
 
85
  description="Fill in your details, upload an image, and generate a business card with a QR code containing your information."
86
  )
87
 
88
+ iface.launch()