Spaces:
Sleeping
Sleeping
umm-maybe
commited on
Commit
·
8f687fb
1
Parent(s):
3c17d63
Fix html
Browse files
app.py
CHANGED
@@ -16,7 +16,8 @@ def vizTour(activityList):
|
|
16 |
net.add_edge(lastActivity, activity)
|
17 |
lastActivity = activity
|
18 |
net.save_graph('tour.html')
|
19 |
-
tour_html = open('tour.html', 'r')
|
|
|
20 |
return tour_html
|
21 |
|
22 |
def getTour(income,size,years,sex,edu,wrk):
|
@@ -67,10 +68,10 @@ def getTour(income,size,years,sex,edu,wrk):
|
|
67 |
activity_list_str = generated[start_pos:end_pos]
|
68 |
print(f"Extracted: '{activity_list_str}'")
|
69 |
# this check doesn't appear to work anyways
|
70 |
-
if person['wrk']=='yes' and activity_list_str.find('Work')==-1:
|
71 |
-
|
72 |
-
if person['wrk']=='no' and activity_list_str.find('Work')>0:
|
73 |
-
|
74 |
if activity_list_str:
|
75 |
try:
|
76 |
activity_list = json.loads(activity_list_str)
|
|
|
16 |
net.add_edge(lastActivity, activity)
|
17 |
lastActivity = activity
|
18 |
net.save_graph('tour.html')
|
19 |
+
#tour_html = open('tour.html', 'r')
|
20 |
+
tour_html = gr.HTML("<iframe src=\"tour.html\"></iframe>")
|
21 |
return tour_html
|
22 |
|
23 |
def getTour(income,size,years,sex,edu,wrk):
|
|
|
68 |
activity_list_str = generated[start_pos:end_pos]
|
69 |
print(f"Extracted: '{activity_list_str}'")
|
70 |
# this check doesn't appear to work anyways
|
71 |
+
#if person['wrk']=='yes' and activity_list_str.find('Work')==-1:
|
72 |
+
# continue # try again
|
73 |
+
#if person['wrk']=='no' and activity_list_str.find('Work')>0:
|
74 |
+
# continue # try again
|
75 |
if activity_list_str:
|
76 |
try:
|
77 |
activity_list = json.loads(activity_list_str)
|