Spaces:
Sleeping
Sleeping
Richard Fan
commited on
Commit
·
b14ab77
1
Parent(s):
16be436
update app
Browse files- src/app.py +3 -1
src/app.py
CHANGED
@@ -59,7 +59,9 @@ categories_map = {
|
|
59 |
|
60 |
|
61 |
def sample(email, topic, physics_topic, categories, interest):
|
62 |
-
if
|
|
|
|
|
63 |
if isinstance(physics_topic, list):
|
64 |
raise gr.Error("You must choose a physics topic.")
|
65 |
topic = physics_topic
|
|
|
59 |
|
60 |
|
61 |
def sample(email, topic, physics_topic, categories, interest):
|
62 |
+
if not topic:
|
63 |
+
raise gr.Error("You must choose a topic.")
|
64 |
+
if topic == "Physics":
|
65 |
if isinstance(physics_topic, list):
|
66 |
raise gr.Error("You must choose a physics topic.")
|
67 |
topic = physics_topic
|