Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -36,22 +36,18 @@ tokenizer = AutoTokenizer.from_pretrained("medalpaca/medalpaca-7b")
|
|
36 |
|
37 |
|
38 |
def fn(*args):
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
-
if len(all_symptoms) > 17:
|
43 |
-
raise gr.Error("Please select a maximum of 17 symptoms.")
|
44 |
-
elif len(all_symptoms) < 3:
|
45 |
-
raise gr.Error("Please select at least 3 symptoms.")
|
46 |
|
47 |
-
symptoms = all_symptoms # Update global symptoms list
|
48 |
-
return predd(loaded_rf,symptoms)
|
49 |
|
50 |
|
51 |
|
52 |
-
symptoms = []
|
53 |
-
|
54 |
-
|
55 |
|
56 |
demo = gr.Interface(
|
57 |
fn, [
|
|
|
36 |
|
37 |
|
38 |
def fn(*args):
|
39 |
+
all_symptoms = [symptom for symptom_list in args for symptom in symptom_list]
|
40 |
+
if len(all_symptoms) > 17:
|
41 |
+
raise gr.Error("Please select a maximum of 17 symptoms.")
|
42 |
+
elif len(all_symptoms) < 3:
|
43 |
+
raise gr.Error("Please select at least 3 symptoms.")
|
44 |
+
symptoms = all_symptoms # Update global symptoms list
|
45 |
+
return predd(loaded_rf,symptoms)
|
46 |
|
|
|
|
|
|
|
|
|
47 |
|
|
|
|
|
48 |
|
49 |
|
50 |
|
|
|
|
|
|
|
51 |
|
52 |
demo = gr.Interface(
|
53 |
fn, [
|