Spaces:
Runtime error
Runtime error
Julien Ajdenbaum
commited on
Commit
·
1471ce5
1
Parent(s):
15d8981
added genomic risks
Browse files- app.py +10 -8
- tmp/2415.png +0 -0
- tmp/6348.png +0 -0
- tmp/6617.png +0 -0
- tmp/6985.png +0 -0
- tmp/8442.png +0 -0
- tmp/9541.png +0 -0
- tmp/9617.png +0 -0
- tmp/981.png +0 -0
app.py
CHANGED
@@ -43,17 +43,18 @@ def predict(file, age, parent, gp):
|
|
43 |
quantity = pad(np.array([320, 450, 300, 120, 280]) / 500)
|
44 |
min_normal = pad(np.array([250, 200, 210, 100, 250]) / 500)
|
45 |
max_normal = pad(np.array([400, 300, 450, 150, 300]) / 500)
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
53 |
|
54 |
useful_products = ("Hydrating Shampoo : https://www.headandshoulders.fr/fr-fr/\n"
|
55 |
"Light Hat : https://www.amazon.com/light-therapy-hat/s?k=light+therapy+hat")
|
56 |
-
return skio.imread("results.png"), 'Dermatitis\nDryness\nDandruff', evolution_plot(age), useful_products
|
57 |
# GUI
|
58 |
title = 'Hair loss prediction'
|
59 |
description = 'Metagenomics Scalp Analysis for Hair Loss Prediction'
|
@@ -70,6 +71,7 @@ iface = gr.Interface(
|
|
70 |
outputs=[
|
71 |
gr.Image(label='Scalp Metagenomics Analysis Results'),
|
72 |
gr.Text(label='Current issues :'),
|
|
|
73 |
gr.Image(label='Future Evolution'),
|
74 |
gr.Text(label='Useful Care Products')
|
75 |
],
|
|
|
43 |
quantity = pad(np.array([320, 450, 300, 120, 280]) / 500)
|
44 |
min_normal = pad(np.array([250, 200, 210, 100, 250]) / 500)
|
45 |
max_normal = pad(np.array([400, 300, 450, 150, 300]) / 500)
|
46 |
+
variants = ["Y2TTB9", "9KKGH7", "ML0JH9"]
|
47 |
+
risks = ['Seborrheic eczema', 'Folliculitis', "Pityriasis amiantacea"]
|
48 |
+
percents = ['30', "30", '9']
|
49 |
+
|
50 |
+
geneticRisks = ""
|
51 |
+
|
52 |
+
for variant, risk, percent in zip(variants, risks, percents):
|
53 |
+
geneticRisks += f"Variant {variant} detected, risk of {risk} is {percent} higher.\n"
|
54 |
|
55 |
useful_products = ("Hydrating Shampoo : https://www.headandshoulders.fr/fr-fr/\n"
|
56 |
"Light Hat : https://www.amazon.com/light-therapy-hat/s?k=light+therapy+hat")
|
57 |
+
return skio.imread("results.png"), 'Dermatitis\nDryness\nDandruff', geneticRisks, evolution_plot(age), useful_products
|
58 |
# GUI
|
59 |
title = 'Hair loss prediction'
|
60 |
description = 'Metagenomics Scalp Analysis for Hair Loss Prediction'
|
|
|
71 |
outputs=[
|
72 |
gr.Image(label='Scalp Metagenomics Analysis Results'),
|
73 |
gr.Text(label='Current issues :'),
|
74 |
+
gr.Text(label='Genetic Risks :'),
|
75 |
gr.Image(label='Future Evolution'),
|
76 |
gr.Text(label='Useful Care Products')
|
77 |
],
|
tmp/2415.png
ADDED
tmp/6348.png
DELETED
Binary file (19.2 kB)
|
|
tmp/6617.png
DELETED
Binary file (19.3 kB)
|
|
tmp/6985.png
ADDED
tmp/8442.png
ADDED
tmp/9541.png
DELETED
Binary file (19.3 kB)
|
|
tmp/9617.png
DELETED
Binary file (19.3 kB)
|
|
tmp/981.png
ADDED