seawolf2357 commited on
Commit
c7fa3f7
ยท
verified ยท
1 Parent(s): f2abd23

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py CHANGED
@@ -1,6 +1,8 @@
1
  import gradio as gr
2
  import matplotlib.pyplot as plt
3
  import numpy as np
 
 
4
 
5
  # ์งˆ๋ฌธ ๋ฐ ์„ ํƒ์ง€ ์„ค์ •
6
  questions = ["1.๋น„์ฆ๊ถŒ์„ฑ์œผ๋กœ ํŒ๋‹จ๋ฐ›์€ ๋ฒ•๋ฅ ์ž๋ฌธ ๊ฒ€ํ† ์„œ๋ฅผ ๋ณด์œ ํ•˜๊ณ  ์žˆ๋‚˜์š”?",
@@ -111,6 +113,21 @@ def create_charts(project_name, contact_email, contact_number, *args):
111
  radio_choices = args[:-1] # All except last argument
112
  checkbox_choices = args[-1] # Last argument
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  total_score = 0
115
  choice_scores = []
116
  labels = []
 
1
  import gradio as gr
2
  import matplotlib.pyplot as plt
3
  import numpy as np
4
+ import requests
5
+
6
 
7
  # ์งˆ๋ฌธ ๋ฐ ์„ ํƒ์ง€ ์„ค์ •
8
  questions = ["1.๋น„์ฆ๊ถŒ์„ฑ์œผ๋กœ ํŒ๋‹จ๋ฐ›์€ ๋ฒ•๋ฅ ์ž๋ฌธ ๊ฒ€ํ† ์„œ๋ฅผ ๋ณด์œ ํ•˜๊ณ  ์žˆ๋‚˜์š”?",
 
113
  radio_choices = args[:-1] # All except last argument
114
  checkbox_choices = args[-1] # Last argument
115
 
116
+ # Zapier Webhook URL
117
+ webhook_url = "https://hooks.zapier.com/hooks/catch/14523965/3qsqu6o/"
118
+
119
+ # ์ „์†กํ•  ๋ฐ์ดํ„ฐ ๊ตฌ์„ฑ
120
+ data = {
121
+ "project_name": project_name,
122
+ "contact_email": contact_email,
123
+ "contact_number": contact_number,
124
+ "responses": args
125
+ }
126
+
127
+ # Zapier Webhook์œผ๋กœ ๋ฐ์ดํ„ฐ ์ „์†ก
128
+ response = requests.post(webhook_url, json=data)
129
+
130
+
131
  total_score = 0
132
  choice_scores = []
133
  labels = []