Spaces:
Runtime error
Runtime error
Commit
·
9e7551e
1
Parent(s):
99fe280
Upload 3 files
Browse files- AsynchronousRealTimeLiveAITelemedicineSystem.mp3 +0 -0
- app.py +73 -0
- requirements.txt +2 -0
AsynchronousRealTimeLiveAITelemedicineSystem.mp3
ADDED
|
Binary file (434 kB). View file
|
|
|
app.py
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import pipeline
|
| 2 |
+
import gradio as gr
|
| 3 |
+
|
| 4 |
+
asr = pipeline("automatic-speech-recognition", "facebook/wav2vec2-base-960h")
|
| 5 |
+
classifier = pipeline("text-classification", "michellejieli/emotion_text_classifier")
|
| 6 |
+
|
| 7 |
+
def transcribe(speech, state=""):
|
| 8 |
+
text = asr(speech)["text"]
|
| 9 |
+
state += text + " "
|
| 10 |
+
return text, state
|
| 11 |
+
|
| 12 |
+
def speech_to_text(speech):
|
| 13 |
+
text = asr(speech)["text"]
|
| 14 |
+
return text
|
| 15 |
+
|
| 16 |
+
def text_to_sentiment(text):
|
| 17 |
+
return classifier(text)[0]["label"]
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
demo = gr.Blocks()
|
| 21 |
+
with demo:
|
| 22 |
+
|
| 23 |
+
microphone = gr.Audio(source="microphone", type="filepath")
|
| 24 |
+
audio_file = gr.Audio(type="filepath")
|
| 25 |
+
text = gr.Textbox()
|
| 26 |
+
label = gr.Label()
|
| 27 |
+
|
| 28 |
+
b0 = gr.Button("Speech From Microphone")
|
| 29 |
+
b1 = gr.Button("Recognize Speech")
|
| 30 |
+
b2 = gr.Button("Classify Sentiment")
|
| 31 |
+
|
| 32 |
+
#b0.click(transcribe, inputs=[microphone, "state"], outputs=[text, "state"], live=True)
|
| 33 |
+
b0.click(transcribe, inputs=[microphone], outputs=[text])
|
| 34 |
+
b1.click(speech_to_text, inputs=audio_file, outputs=text)
|
| 35 |
+
b2.click(text_to_sentiment, inputs=text, outputs=label)
|
| 36 |
+
|
| 37 |
+
gr.Markdown("""References:
|
| 38 |
+
|
| 39 |
+
## Building an Asynchronous Real-Time Live Telemedicine System Using AI Pipelines for Smart Communities
|
| 40 |
+
|
| 41 |
+
1. **Designing the Telemedicine System**
|
| 42 |
+
- Identify the needs and challenges of smart communities and design a telemedicine system that addresses these challenges.
|
| 43 |
+
- Choose a platform that allows for asynchronous real-time communication, such as video conferencing or chat-based messaging, to facilitate remote consultations with healthcare providers.
|
| 44 |
+
- Design the system to incorporate AI pipelines that can analyze patient data and provide decision support for healthcare providers.
|
| 45 |
+
|
| 46 |
+
2. **Implementing the AI Pipelines**
|
| 47 |
+
- Identify the relevant AI algorithms and techniques that can be used to analyze patient data, such as machine learning or natural language processing.
|
| 48 |
+
- Integrate these AI pipelines into the telemedicine system to provide decision support for healthcare providers during consultations.
|
| 49 |
+
- Ensure that the AI algorithms are accurate and reliable by testing them on a large and diverse set of patient data.
|
| 50 |
+
|
| 51 |
+
3. **Deploying the Telemedicine System**
|
| 52 |
+
- Deploy the telemedicine system in smart communities, ensuring that it is easily accessible and user-friendly for patients and healthcare providers.
|
| 53 |
+
- Train healthcare providers on how to use the system effectively and provide ongoing support and feedback to optimize its use.
|
| 54 |
+
- Continuously monitor and evaluate the system's performance, making improvements and updates as needed to ensure that it remains effective and efficient in meeting the needs of smart communities.
|
| 55 |
+
|
| 56 |
+
**__Asynchronous Telemedicine:__ A Solution to Address Provider Shortages by Offering Remote Care Services.**
|
| 57 |
+
([Wikipedia](https://en.wikipedia.org/wiki/Telemedicine))
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
# 2023's Top 7 Breakthroughs in Medical Technology
|
| 61 |
+
1. __Asynchronous Telemedicine:__ A Solution to Address Provider Shortages by Offering Remote Care Services. ([Wikipedia](https://en.wikipedia.org/wiki/Telemedicine))
|
| 62 |
+
2. __Ambient and Emotion AI:__ Empowering Patients with Artificial Intelligence That Shows Empathy and Compassion. ([Wikipedia](https://en.wikipedia.org/wiki/Ambient_intelligence))
|
| 63 |
+
3. __Skin Patch Technology:__ A Convenient Way to Measure Vital Signals such as Blood Pressure and Glucose Levels. ([Wikipedia](https://en.wikipedia.org/wiki/Skin_patch))
|
| 64 |
+
4. __Affordable Vein Scanner:__ A Revolutionary Tool to View Veins Through the Skin. ([Wikipedia](https://en.wikipedia.org/wiki/Vein_matching))
|
| 65 |
+
5. __Synthetic Medical Records:__ Creating Reliable Medical Records Using Generative Adversarial Networks. ([Wikipedia](https://en.wikipedia.org/wiki/Synthetic_data))
|
| 66 |
+
6. __Blood Draw Devices for Clinical Trials:__ Facilitating Remote Participation in Trials with Innovative Technology. ([Wikipedia](https://en.wikipedia.org/wiki/Blood_sampling))
|
| 67 |
+
7. __Smart TVs for Remote Care:__ Enhancing Remote Care Consultations with Video Chat and Recordings. ([Wikipedia](https://en.wikipedia.org/wiki/Smart_television))
|
| 68 |
+
|
| 69 |
+
Reference: [The Medical Futurist](https://www.youtube.com/watch?v=_9DpLD4S2AY&list=PLHgX2IExbFotoMt32SrT3Xynt5BXTGnEP&index=2)
|
| 70 |
+
|
| 71 |
+
""")
|
| 72 |
+
|
| 73 |
+
demo.launch()
|
requirements.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
transformers
|
| 2 |
+
torch
|