Julien Ajdenbaum commited on
Commit
1471ce5
·
1 Parent(s): 15d8981

added genomic risks

Browse files
Files changed (9) hide show
  1. app.py +10 -8
  2. tmp/2415.png +0 -0
  3. tmp/6348.png +0 -0
  4. tmp/6617.png +0 -0
  5. tmp/6985.png +0 -0
  6. tmp/8442.png +0 -0
  7. tmp/9541.png +0 -0
  8. tmp/9617.png +0 -0
  9. 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
- txt = 'Bacteria\t\t\t\t\t\tMin\t\t\tMax\n\n'
47
- for i in range(len(product)):
48
- txt += product[i]
49
- txt += "\t\t\t"
50
- txt += quantity[i] + "\t\t" + min_normal[i] + "\t\t" + max_normal[i] + "\t"
51
- txt += '\n'
52
- txt = str(txt)
 
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