Update app.py
Browse files
app.py
CHANGED
|
@@ -181,7 +181,7 @@ def key_gen_fn(user_symptoms: List[str]) -> Dict:
|
|
| 181 |
|
| 182 |
def encrypt_fn(user_symptoms: np.ndarray, user_id: str) -> None:
|
| 183 |
"""
|
| 184 |
-
Encrypt the user symptoms vector in the `Client
|
| 185 |
|
| 186 |
Args:
|
| 187 |
user_symptoms (List[str]): The vector symptoms provided by the user
|
|
@@ -505,31 +505,31 @@ if __name__ == "__main__":
|
|
| 505 |
gr.Markdown()
|
| 506 |
gr.Markdown(
|
| 507 |
"""
|
| 508 |
-
<p align="center">
|
| 509 |
-
|
| 510 |
-
</p>
|
| 511 |
""")
|
| 512 |
gr.Markdown()
|
| 513 |
-
gr.Markdown("""<h2 align="center">Health prediction model with High end encryption</h2>""")
|
| 514 |
gr.Markdown()
|
| 515 |
gr.Markdown(
|
| 516 |
"""
|
| 517 |
-
<p align="center">
|
| 518 |
-
|
| 519 |
-
|
| 520 |
-
|
| 521 |
-
|
| 522 |
-
|
| 523 |
-
|
| 524 |
-
|
| 525 |
-
</p>
|
| 526 |
""")
|
| 527 |
gr.Markdown()
|
| 528 |
gr.Markdown(
|
| 529 |
""""
|
| 530 |
-
<p align="center">
|
| 531 |
-
<img width="65%" height="25%" src="https://raw.githubusercontent.com/kcelia/Img/main/healthcare_prediction.jpg">
|
| 532 |
-
</p>
|
| 533 |
"""
|
| 534 |
)
|
| 535 |
gr.Markdown("## Notes")
|
|
@@ -584,7 +584,7 @@ if __name__ == "__main__":
|
|
| 584 |
# Submit botton
|
| 585 |
submit_btn = gr.Button("Submit")
|
| 586 |
# Clear botton
|
| 587 |
-
clear_button = gr.Button("Reset
|
| 588 |
|
| 589 |
default_disease_box.change(
|
| 590 |
fn=display_default_symptoms_fn, inputs=[default_disease_box], outputs=[default_symptoms]
|
|
@@ -600,7 +600,7 @@ if __name__ == "__main__":
|
|
| 600 |
gr.Markdown("\n")
|
| 601 |
gr.Markdown("## Step 2: Encrypt data")
|
| 602 |
gr.Markdown("<hr />")
|
| 603 |
-
gr.Markdown("<span style='color:grey'>Client
|
| 604 |
# Step 2.1: Key generation
|
| 605 |
gr.Markdown(
|
| 606 |
"### Key Generation\n\n"
|
|
@@ -674,7 +674,7 @@ if __name__ == "__main__":
|
|
| 674 |
gr.Markdown("<span style='color:grey'>Server Side</span>")
|
| 675 |
gr.Markdown(
|
| 676 |
"Once the server receives the encrypted data, it can process and compute the output without ever decrypting the data just as it would on clear data.\n\n"
|
| 677 |
-
"This server employs a [Logistic Regression](https://github.com/zama-ai/concrete-ml/tree/release/1.1.x/use_case_examples/disease_prediction) model that has been trained on this [data-set](https://github.com/anujdutt9/Disease-Prediction-from-Symptoms/tree/master/dataset)."
|
| 678 |
)
|
| 679 |
|
| 680 |
run_fhe_btn = gr.Button("Run the FHE evaluation")
|
|
@@ -726,15 +726,15 @@ if __name__ == "__main__":
|
|
| 726 |
# ------------------------- End -------------------------
|
| 727 |
|
| 728 |
gr.Markdown(
|
| 729 |
-
"""The app was built with [
|
| 730 |
-
|
| 731 |
"""
|
| 732 |
)
|
| 733 |
|
| 734 |
gr.Markdown("\n\n")
|
| 735 |
|
| 736 |
gr.Markdown(
|
| 737 |
-
"""**Please Note**: This
|
| 738 |
It should not be considered as a replacement for professional medical counsel, diagnosis, or therapy for any health or related issues.
|
| 739 |
Any questions or concerns about your individual health should be addressed to your doctor or another qualified healthcare provider.
|
| 740 |
"""
|
|
|
|
| 181 |
|
| 182 |
def encrypt_fn(user_symptoms: np.ndarray, user_id: str) -> None:
|
| 183 |
"""
|
| 184 |
+
Encrypt the user symptoms vector in the `Client`.
|
| 185 |
|
| 186 |
Args:
|
| 187 |
user_symptoms (List[str]): The vector symptoms provided by the user
|
|
|
|
| 505 |
gr.Markdown()
|
| 506 |
gr.Markdown(
|
| 507 |
"""
|
| 508 |
+
# <p align="center">
|
| 509 |
+
# <img width=200 src="https://huggingface.co/spaces/ObindiG/MOH/blob/main/healthcare_prediction.jpg">
|
| 510 |
+
# </p>
|
| 511 |
""")
|
| 512 |
gr.Markdown()
|
| 513 |
+
gr.Markdown("""<h2 align="center">Health prediction model with High end encryption </h2>""")
|
| 514 |
gr.Markdown()
|
| 515 |
gr.Markdown(
|
| 516 |
"""
|
| 517 |
+
# <p align="center">
|
| 518 |
+
# <a href="https://laoctatechlabs.com"> <img style="vertical-align: middle; display:inline-block; margin-right: 3px;" width=15 src="https://user-images.githubusercontent.com/5758427/197972109-faaaff3e-10e2-4ab6-80f5-7531f7cfb08f.png">laocta Tech Labs</a>
|
| 519 |
+
# —
|
| 520 |
+
# <a href="https://docs.zama.ai/concrete-ml"> <img style="vertical-align: middle; display:inline-block; margin-right: 3px;" width=15 src="https://user-images.githubusercontent.com/5758427/197976802-fddd34c5-f59a-48d0-9bff-7ad1b00cb1fb.png">Documentation</a>
|
| 521 |
+
# —
|
| 522 |
+
# <a href="https://zama.ai/community"> <img style="vertical-align: middle; display:inline-block; margin-right: 3px;" width=15 src="https://user-images.githubusercontent.com/5758427/197977153-8c9c01a7-451a-4993-8e10-5a6ed5343d02.png">Community</a>
|
| 523 |
+
# —
|
| 524 |
+
# <a href="https://twitter.com/zama_fhe"> <img style="vertical-align: middle; display:inline-block; margin-right: 3px;" width=15 src="https://user-images.githubusercontent.com/5758427/197975044-bab9d199-e120-433b-b3be-abd73b211a54.png">@zama_fhe</a>
|
| 525 |
+
# </p>
|
| 526 |
""")
|
| 527 |
gr.Markdown()
|
| 528 |
gr.Markdown(
|
| 529 |
""""
|
| 530 |
+
# <p align="center">
|
| 531 |
+
# <img width="65%" height="25%" src="https://raw.githubusercontent.com/kcelia/Img/main/healthcare_prediction.jpg">
|
| 532 |
+
# </p>
|
| 533 |
"""
|
| 534 |
)
|
| 535 |
gr.Markdown("## Notes")
|
|
|
|
| 584 |
# Submit botton
|
| 585 |
submit_btn = gr.Button("Submit")
|
| 586 |
# Clear botton
|
| 587 |
+
clear_button = gr.Button("Reset Model 🔁", visible=False)
|
| 588 |
|
| 589 |
default_disease_box.change(
|
| 590 |
fn=display_default_symptoms_fn, inputs=[default_disease_box], outputs=[default_symptoms]
|
|
|
|
| 600 |
gr.Markdown("\n")
|
| 601 |
gr.Markdown("## Step 2: Encrypt data")
|
| 602 |
gr.Markdown("<hr />")
|
| 603 |
+
gr.Markdown("<span style='color:grey'>Client </span>")
|
| 604 |
# Step 2.1: Key generation
|
| 605 |
gr.Markdown(
|
| 606 |
"### Key Generation\n\n"
|
|
|
|
| 674 |
gr.Markdown("<span style='color:grey'>Server Side</span>")
|
| 675 |
gr.Markdown(
|
| 676 |
"Once the server receives the encrypted data, it can process and compute the output without ever decrypting the data just as it would on clear data.\n\n"
|
| 677 |
+
# "This server employs a [Logistic Regression](https://github.com/zama-ai/concrete-ml/tree/release/1.1.x/use_case_examples/disease_prediction) model that has been trained on this [data-set](https://github.com/anujdutt9/Disease-Prediction-from-Symptoms/tree/master/dataset)."
|
| 678 |
)
|
| 679 |
|
| 680 |
run_fhe_btn = gr.Button("Run the FHE evaluation")
|
|
|
|
| 726 |
# ------------------------- End -------------------------
|
| 727 |
|
| 728 |
gr.Markdown(
|
| 729 |
+
"""The app was built with [Laocta Trch Labs](https://laoctatechlabs.com), a Privacy-Preserving Machine Learning tool Powered by Laocta .
|
| 730 |
+
reach us[Our website](https://laoctatechlabs.com) ⭐.
|
| 731 |
"""
|
| 732 |
)
|
| 733 |
|
| 734 |
gr.Markdown("\n\n")
|
| 735 |
|
| 736 |
gr.Markdown(
|
| 737 |
+
"""**Please Note**: This system is still under development .
|
| 738 |
It should not be considered as a replacement for professional medical counsel, diagnosis, or therapy for any health or related issues.
|
| 739 |
Any questions or concerns about your individual health should be addressed to your doctor or another qualified healthcare provider.
|
| 740 |
"""
|