Update app.py
Browse files
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 = []
|