Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,112 @@ import streamlit as st
|
|
2 |
from graphviz import Digraph
|
3 |
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
st.markdown("""
|
6 |
|
7 |
# ๐ Multiply your productivity by 100 times today using AI - Two easy ways to turbo boost your AI learning journey! ๐ป
|
@@ -35,57 +141,6 @@ st.markdown("""
|
|
35 |
""")
|
36 |
|
37 |
|
38 |
-
st.markdown("""
|
39 |
-
|
40 |
-
# Multiply your productivity by 100 times today using AI:
|
41 |
-
- Lets prove it with HuggingFace, Gradio, Streamlit, ChatGPT,and HTML/Javascript
|
42 |
-
- My Progression:
|
43 |
-
1. 2021 - With AI Coding From Scratch **10 AI programs per year** = 1 AI Program per 36.5 days.
|
44 |
-
2. 2022 - Discovered HF Spaces. **200 AI Programs** = a little over .5 Programs per day.
|
45 |
-
3. 2023 - New process - **AI Pair Programming** ChatGPT+HF = 266 in Q1 (**1064 programs per year**)
|
46 |
-
4. Conclusion: Over 100x with this simple recipe.
|
47 |
-
|
48 |
-
## When focused using AI to write outline, simplify outline, generate examples, debug and curate:
|
49 |
-
1. **Record:** 30 working programs in 2 days on planned subject outline. (15/day)
|
50 |
-
2. Synopsis: Learning in the Loop - AI Pair programming expands your knowledge.
|
51 |
-
3. Use **Targeted AI vocabulary keywords** to generate domain specific code and text mashups.
|
52 |
-
|
53 |
-
# How to Prompt using domain technical knowledge to accelerate process of design and development.
|
54 |
-
1. Top Ten Favorite Quick and Easy prompting patterns:
|
55 |
-
1. **Markdown** 1,2,3
|
56 |
-
1. **Prompt:** Create a markdown cheat sheet that lists all the commands and short instructions for performing markdown code.
|
57 |
-
2. **Trouble** with code versus non code due to delimiters like triple apostrophe? Its using markdown.
|
58 |
-
3. **Prompt:** Show full code listing in markdown code delimited by ``` with no comments
|
59 |
-
2. **Mermaid** for sorted and organized graphs.
|
60 |
-
3. **Python Streamlit** and Python gradio with code example input.
|
61 |
-
4. **Progressions** iterate with prompts to get what you want in a few steps..
|
62 |
-
1. **Prompt and Experiment:** Write an AI program using python, streamlit sklearn and keras to produce an AI program predicting sepal length.
|
63 |
-
2. **Curate and Revise:** Show full code listing. remove commentary. Make code listing as short as possible with few lines of code
|
64 |
-
3. **Reinforce and Teach:** Test and Share with HF to debug and test. Demonstrate and share links to others.
|
65 |
-
2. **Why does this work?** Copy and Modify Pattern, Mirroring, and the Human Brain.
|
66 |
-
3. **Life Lessons** from Steel Manufacturing - Innovation, Productivity
|
67 |
-
1. **US Steel** - Cost of not changing and 5%
|
68 |
-
2. **Tata Steel** - Employment, Karma, and Legends
|
69 |
-
|
70 |
-
# HF Token - Create a new token in Settings for this code:
|
71 |
-
HF_TOKEN = os.environ.get("HF_TOKEN") # get token from secrets, copy token value HF_TOKEN from Profile settings token into this repo settings
|
72 |
-
generator2 = gr.Interface.load("huggingface/EleutherAI/gpt-neo-2.7B", api_key=HF_TOKEN) # add api_key=HF_TOKEN to get over the quota error
|
73 |
-
generator3 = gr.Interface.load("huggingface/EleutherAI/gpt-j-6B", api_key=HF_TOKEN)
|
74 |
-
generator1 = gr.Interface.load("huggingface/gpt2-large", api_key=HF_TOKEN)
|
75 |
-
gr.Parallel(generator1, generator2, generator3, inputs=gr.inputs.Textbox(lines=5, label="Enter a sentence to get another sentence."),
|
76 |
-
title=title, examples=examples).launch(share=False)
|
77 |
-
|
78 |
-
# Access Tokens:
|
79 |
-

|
80 |
-
|
81 |
-
3. Gradio Spaces - Lets set time records for copy/modify pattern
|
82 |
-
1. Concept, Examples, 3 AI Models: https://huggingface.co/spaces/awacke1/Sentence2Paragraph
|
83 |
-
2. Generative AI: https://huggingface.co/spaces/awacke1/Image-to-Line-Drawings
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
""")
|
88 |
-
|
89 |
|
90 |
|
91 |
st.markdown("""
|
|
|
2 |
from graphviz import Digraph
|
3 |
|
4 |
|
5 |
+
st.markdown("""
|
6 |
+
|
7 |
+
# ๐ Multiply your productivity by 100 times today using AI:
|
8 |
+
|
9 |
+
๐ Lets prove it with HuggingFace, Gradio, Streamlit, ChatGPT,and HTML/Javascript
|
10 |
+
My Progression:
|
11 |
+
1. 2021 - With AI Coding From Scratch **10 AI programs per year** = 1 AI Program per 36.5 days.
|
12 |
+
2. 2022 - Discovered HF Spaces. **200 AI Programs** = a little over .5 Programs per day.
|
13 |
+
3. 2023 - New process - **AI Pair Programming** ChatGPT+HF = 266 in Q1 (**1064 programs per year**)
|
14 |
+
4. Conclusion: Over 100x with this simple recipe.
|
15 |
+
|
16 |
+
## ๐ When focused using AI to write outline, simplify outline, generate examples, debug and curate:
|
17 |
+
1. **Record:** 30 working programs in 2 days on planned subject outline. (15/day)
|
18 |
+
2. Synopsis: Learning in the Loop - AI Pair programming expands your knowledge.
|
19 |
+
3. Use **Targeted AI vocabulary keywords** to generate domain specific code and text mashups.
|
20 |
+
|
21 |
+
# ๐ How to Prompt using domain technical knowledge to accelerate process of design and development.
|
22 |
+
1. Top Ten Favorite Quick and Easy prompting patterns:
|
23 |
+
1. **Markdown** 1,2,3
|
24 |
+
1. **Prompt:** Create a markdown cheat sheet that lists all the commands and short instructions for performing markdown code.
|
25 |
+
2. **Trouble** with code versus non code due to delimiters like triple apostrophe? Its using markdown.
|
26 |
+
3. **Prompt:** Show full code listing in markdown code with no comments
|
27 |
+
2. **Mermaid** for sorted and organized graphs. -๐ https://huggingface.co/spaces/awacke1/MermaidModelHTML5Demo
|
28 |
+
3. **Python Streamlit** and Python gradio with code example input.
|
29 |
+
4. **Progressions** iterate with prompts to get what you want in a few steps..
|
30 |
+
1. **Prompt and Experiment:** Write an AI program using python, streamlit sklearn and keras to produce an AI program predicting sepal length.
|
31 |
+
2. **Curate and Revise:** Show full code listing. remove commentary. Make code listing as short as possible with few lines of code
|
32 |
+
3. **Reinforce and Teach:** Test and Share with HF to debug and test. Demonstrate and share links to others.
|
33 |
+
2. **Why does this work?** Copy and Modify Pattern, Mirroring, and the Human Brain.
|
34 |
+
3. **Life Lessons** from Steel Manufacturing - Innovation, Productivity
|
35 |
+
1. **US Steel** - Cost of not changing and 5%
|
36 |
+
2. **Tata Steel** - Employment, Karma, and Legends
|
37 |
+
|
38 |
+
# ๐ HF Token - Create a new token in Settings for this code:
|
39 |
+
1. HF_TOKEN = os.environ.get("HF_TOKEN") # get token from secrets, copy token value HF_TOKEN from Profile settings token into this repo settings
|
40 |
+
2. generator2 = gr.Interface.load("huggingface/EleutherAI/gpt-neo-2.7B", api_key=HF_TOKEN) # add api_key=HF_TOKEN to get over the quota error
|
41 |
+
3. generator3 = gr.Interface.load("huggingface/EleutherAI/gpt-j-6B", api_key=HF_TOKEN)
|
42 |
+
4. generator1 = gr.Interface.load("huggingface/gpt2-large", api_key=HF_TOKEN)
|
43 |
+
5. gr.Parallel(generator1, generator2, generator3, inputs=gr.inputs.Textbox(lines=5, label="Enter a sentence to get another sentence."),
|
44 |
+
title=title, examples=examples).launch(share=False)
|
45 |
+
|
46 |
+
# ๐ Access Tokens:
|
47 |
+

|
48 |
+
|
49 |
+
# ๐ Org Join:
|
50 |
+
1. Org: https://huggingface.co/CognitiveAIForHealth
|
51 |
+
2. Join Link: https://huggingface.co/organizations/CognitiveAIForHealth/share/LUIgWlwxqHYTeKWwVGOCaADIJNDBdtOfER
|
52 |
+
3. Observe - Verify if you show up in Team list.
|
53 |
+
|
54 |
+
# ๐ Gradio Spaces - Lets set time records for copy/modify pattern
|
55 |
+
1. Concept, Examples, 3 AI Models: https://huggingface.co/spaces/awacke1/Sentence2Paragraph
|
56 |
+
2. Generative AI: https://huggingface.co/spaces/awacke1/Image-to-Line-Drawings
|
57 |
+
|
58 |
+
# ๐ Easy Button in Model Pages - Model Bakeoffs with Gradio:
|
59 |
+
1. Task Search, find models
|
60 |
+
2. Open 5, try model card tests
|
61 |
+
3. Open 3 in new tab, Deploy Spaces.
|
62 |
+
|
63 |
+
# ๐ Top Copy and Modify Examples
|
64 |
+
- Lets set time records for copy/modify pattern - Get these running in your account.
|
65 |
+
1. **Cognitive, RLHF**: [Example ๐ฉบโ๏ธ](https://huggingface.co/spaces/awacke1/Cognitive-AI-Episodic-Semantic-Memory-Demo)
|
66 |
+
2. **Big Science Bloom**: https://huggingface.co/spaces/awacke1/BigScienceContinualGenerator
|
67 |
+
2. **Clinical Terminology** NER: [Example ๐ฉบโ๏ธNLP Clinical Ontology Biomedical NER](https://huggingface.co/spaces/awacke1/Biomed-NLP-AI-Clinical-Terminology)
|
68 |
+
3. **Torch and Git**: https://huggingface.co/spaces/awacke1/Image-to-Multilingual-OCR
|
69 |
+
4. **Useful QA, NLP and Visualization Models**:
|
70 |
+
- Heatmap, Cluster: https://huggingface.co/spaces/awacke1/NLPSentenceSimilarityHeatmap
|
71 |
+
- QA Context: https://huggingface.co/spaces/awacke1/Question-answering
|
72 |
+
- Seq2Seq: https://huggingface.co/spaces/awacke1/4-Seq2SeqQAT5
|
73 |
+
- MLM: https://huggingface.co/spaces/awacke1/SOTA-MedEntity
|
74 |
+
5. **Mapbox with Prompts**: https://huggingface.co/spaces/awacke1/StreamlitPydeckMapVisualViewStateForLatitudeLongitude
|
75 |
+
|
76 |
+
# Curated Copy and Modify:
|
77 |
+
# Advanced NLP ASR Examples:
|
78 |
+
1. ๐ฉบโ๏ธ https://huggingface.co/spaces/awacke1/ASR-High-Accuracy-Test
|
79 |
+
3. ๐ฉบโ๏ธ https://huggingface.co/spaces/awacke1/TTS-STT-Blocks
|
80 |
+
4. ๐ฉบโ๏ธ https://huggingface.co/spaces/awacke1/CloneAnyVoice
|
81 |
+
|
82 |
+
โ **๐ฉบโ๏ธ Question answering** - Answer questions posed in natural language. [Example](https://huggingface.co/spaces/awacke1/Question-answering)
|
83 |
+
๐ **๐ฉบโ๏ธ Text classification** - Classify text into different categories. [Example](https://huggingface.co/spaces/awacke1/sileod-deberta-v3-base-tasksource-nli)
|
84 |
+
๐ฌ **๐ฉบโ๏ธ Text generation** - Generate natural language text. [Example](https://huggingface.co/spaces/awacke1/Sentence2Paragraph)
|
85 |
+
๐ **๐ฉบโ๏ธ Generation of new data**: Create new data that resembles existing data. [Example](https://huggingface.co/spaces/awacke1/GenAI-Generate-New-Data-Resembling-Example)
|
86 |
+
๐ **Data synthesis**: Synthesize data from multiple sources to create new datasets. [Example](https://huggingface.co/spaces/awacke1/Data-Synthesizer-Synthesize-From-Multiple-Sources)
|
87 |
+
๐ **๐ฉบโ๏ธ Data augmentation**: Augment existing datasets to make them larger and more diverse. [Example](https://huggingface.co/spaces/awacke1/Data-Augmentation)
|
88 |
+
๐ฉบโ๏ธ Yolo Real Time Image Recognition from Webcam: https://huggingface.co/spaces/awacke1/Webcam-Object-Recognition-Yolo-n-Coco
|
89 |
+
|
90 |
+
๐ฉบโ๏ธ [ROUGE](https://huggingface.co/spaces/evaluate-metric/rouge)
|
91 |
+
๐ฉบโ๏ธ [BLEU](https://huggingface.co/spaces/evaluate-metric/bleu)
|
92 |
+
|
93 |
+
## ๐ฉบโ๏ธ Hospital Visualizations
|
94 |
+
๐ฉบโ๏ธ https://huggingface.co/spaces/awacke1/VizLib-TopLargeHospitalsMinnesota
|
95 |
+
๐ฉบโ๏ธ https://huggingface.co/spaces/awacke1/VizLib-TopLargeHospitalsNewJersey
|
96 |
+
๐ฉบโ๏ธ https://huggingface.co/spaces/awacke1/VizLib-TopLargeHospitalsMentalHealth
|
97 |
+
๐ฉบโ๏ธ https://huggingface.co/spaces/awacke1/VizLib-GraphViz-Folium-MapTopLargeHospitalsinWI
|
98 |
+
|
99 |
+
๐ฉบโ๏ธ Game Activity Graph: https://huggingface.co/spaces/awacke1/CardGameActivity-GraphViz
|
100 |
+
๐ฉบโ๏ธ SVG Card Generation: https://huggingface.co/spaces/awacke1/VizLib-SVGWrite-Streamlit
|
101 |
+
|
102 |
+
## Clinical Smart on FHIR
|
103 |
+
๐ฉบโ๏ธ https://huggingface.co/spaces/awacke1/Assessment-By-Organs
|
104 |
+
๐ฉบโ๏ธ https://huggingface.co/spaces/awacke1/SMART-FHIR-Assessment-Test2
|
105 |
+
๐ฉบโ๏ธ https://huggingface.co/spaces/awacke1/FHIRLib-FHIRKit
|
106 |
+
|
107 |
+
""")
|
108 |
+
|
109 |
+
|
110 |
+
|
111 |
st.markdown("""
|
112 |
|
113 |
# ๐ Multiply your productivity by 100 times today using AI - Two easy ways to turbo boost your AI learning journey! ๐ป
|
|
|
141 |
""")
|
142 |
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
|
146 |
st.markdown("""
|