rosemariafontana commited on
Commit
601fb97
·
verified ·
1 Parent(s): 62ccd3a

initial attempt

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def display_survey(survey_id):
4
+ survey_url = f"https://app.surveystack.io/api/submissions?survey={survey_id}&match=\{\"_id\":\{\"$oid\":\"60d0adf824a0a600014a1c18\"}}"
5
+ iframe_html = f'<iframe src="{survey_url}" width="100%" height="600px"></iframe>'
6
+ return iframe_html
7
+
8
+ app = gr.Interface(
9
+ fn=display_survey,
10
+ inputs=gr.Textbox(label="Enter SurveyStack Survey ID"),
11
+ outputs="html",
12
+ title="SurveyStack Survey Viewer",
13
+ description="Enter the Survey ID to start the survey."
14
+ )
15
+
16
+ app.launch()