rosemariafontana commited on
Commit
31bd471
·
verified ·
1 Parent(s): b3f6f88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -2,11 +2,11 @@ import gradio as gr
2
  import urllib
3
 
4
  def display_survey(survey_id):
5
- base_url = "https://app.surveystack.io/api/submissions"
6
- params = {'survey': survey_id}
7
- query_string = urllib.parse.urlencode(params)
8
-
9
- survey_url = "{}{}{}".format(base_url, "?", query_string)
10
 
11
  print(survey_url)
12
 
 
2
  import urllib
3
 
4
  def display_survey(survey_id):
5
+ base_url = "https://app.surveystack.io/groups/"
6
+ group_id = "5e95e368fbbf75000146a006" # Make sure this is the correct group ID
7
+
8
+ # Construct the full URL using urljoin to ensure proper formatting
9
+ survey_url = urljoin(base_url, f"{group_id}/surveys/{survey_id}/submissions/new")
10
 
11
  print(survey_url)
12