awacke1 commited on
Commit
ffd75f1
Β·
1 Parent(s): 18b7c86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +71 -51
app.py CHANGED
@@ -1,9 +1,13 @@
1
  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:
8
 
9
  🌐 Lets prove it with HuggingFace, Gradio, Streamlit, ChatGPT,and HTML/Javascript
@@ -11,48 +15,58 @@ 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
  ![image](https://user-images.githubusercontent.com/30595158/224001979-aba0c67d-dc28-44f8-bf13-cd01f9fe9b48.png)
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:
@@ -61,45 +75,51 @@ My Progression:
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
 
1
  import streamlit as st
2
  from graphviz import Digraph
3
 
 
4
  st.markdown("""
5
 
6
+ # 🌐 Org Join:
7
+ 1. Org: https://huggingface.co/CognitiveAIForHealth
8
+ 2. Join Link: https://huggingface.co/organizations/CognitiveAIForHealth/share/LUIgWlwxqHYTeKWwVGOCaADIJNDBdtOfER
9
+ 3. Observe - Verify if you show up in Team list.
10
+
11
  # πŸ‘‹ Multiply your productivity by 100 times today using AI:
12
 
13
  🌐 Lets prove it with HuggingFace, Gradio, Streamlit, ChatGPT,and HTML/Javascript
 
15
  1. 2021 - With AI Coding From Scratch **10 AI programs per year** = 1 AI Program per 36.5 days.
16
  2. 2022 - Discovered HF Spaces. **200 AI Programs** = a little over .5 Programs per day.
17
  3. 2023 - New process - **AI Pair Programming** ChatGPT+HF = 266 in Q1 (**1064 programs per year**)
18
+
19
+ # 🌐 Conclusion: Over 100x with this simple recipe.
20
+
21
+ ## 🌐 AI Pair Programming Process and Method:
22
+
23
+ When focused using AI to write outline, simplify outline, generate examples, debug and curate:
24
  1. **Record:** 30 working programs in 2 days on planned subject outline. (15/day)
25
  2. Synopsis: Learning in the Loop - AI Pair programming expands your knowledge.
26
  3. Use **Targeted AI vocabulary keywords** to generate domain specific code and text mashups.
27
 
28
+ ## 🌐 Prompt using domain technical knowledge to accelerate process of design and development.
29
+
30
+ ## Favorite Quick and Easy prompting patterns:
31
+
32
+ **Markdown**
33
+ 1. **Prompt:** Create a markdown cheat sheet that lists all the commands and short instructions for performing markdown code.
34
+ 2. **Trouble** with code versus non code due to delimiters like triple apostrophe? Its using markdown.
35
+ 3. **Prompt:** Show full code listing in markdown code with no comments
36
+
37
+ **Mermaid**
38
+ Organized, Sorted Graphs.
39
+ 🌐 https://huggingface.co/spaces/awacke1/MermaidModelHTML5Demo
40
+ 1. **Python Streamlit** and Python gradio with code example input.
41
+ 2. **Progressions** iterate with prompts to get what you want in a few steps..
42
+ 3. **Prompt and Experiment:** Write an AI program using python, streamlit sklearn and keras to produce an AI program predicting sepal length.
43
+ 4. **Curate and Revise:** Show full code listing. remove commentary. Make code listing as short as possible with few lines of code
44
+ 5. **Reinforce and Teach:** Test and Share with HF to debug and test. Demonstrate and share links to others.
45
+
46
+ # **Why does this work?**
47
+ Copy and Modify Pattern, Mirroring, and the Human Brain.
48
+
49
+ # Cost of not innovating:
50
+ 1. **Life Lessons** from Steel Manufacturing - Innovation, Productivity
51
+ 2. **US Steel** - Cost of not changing and 5%
52
+ 3. **Tata Steel** - Employment, Karma, and Legends
53
+
54
 
55
  # 🌐 HF Token - Create a new token in Settings for this code:
56
+
57
+ Copy and Modify this Gradio AI Pipeline, Then Code Review:
58
+ https://huggingface.co/spaces/awacke1/Sentence2Paragraph
59
+
60
  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
61
  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
62
  3. generator3 = gr.Interface.load("huggingface/EleutherAI/gpt-j-6B", api_key=HF_TOKEN)
63
  4. generator1 = gr.Interface.load("huggingface/gpt2-large", api_key=HF_TOKEN)
64
+ 5. gr.Parallel(generator1, generator2, generator3, inputs=gr.inputs.Textbox(lines=5, label="Enter a sentence to get another sentence."), title=title, examples=examples).launch(share=False)
 
65
 
66
  # 🌐 Access Tokens:
67
  ![image](https://user-images.githubusercontent.com/30595158/224001979-aba0c67d-dc28-44f8-bf13-cd01f9fe9b48.png)
68
 
 
 
 
 
 
69
  # 🌐 Gradio Spaces - Lets set time records for copy/modify pattern
 
70
  2. Generative AI: https://huggingface.co/spaces/awacke1/Image-to-Line-Drawings
71
 
72
  # 🌐 Easy Button in Model Pages - Model Bakeoffs with Gradio:
 
75
  3. Open 3 in new tab, Deploy Spaces.
76
 
77
  # 🌐 Top Copy and Modify Examples
78
+
79
+ Lets set time records for copy/modify pattern - Get these running in your account.
80
+
81
  1. **Cognitive, RLHF**: [Example πŸ©Ίβš•οΈ](https://huggingface.co/spaces/awacke1/Cognitive-AI-Episodic-Semantic-Memory-Demo)
82
+ 2. **Big Science Bloom**: [Example πŸ©Ίβš•οΈ](https://huggingface.co/spaces/awacke1/BigScienceContinualGenerator)
83
+ 3. **Torch and Git**: [Example πŸ©Ίβš•οΈ](https://huggingface.co/spaces/awacke1/Image-to-Multilingual-OCR)
 
84
  4. **Useful QA, NLP and Visualization Models**:
85
+ - Heatmap, Cluster: [Example πŸ©Ίβš•οΈ](https://huggingface.co/spaces/awacke1/NLPSentenceSimilarityHeatmap)
86
+ - QA Context: [Example πŸ©Ίβš•οΈ](https://huggingface.co/spaces/awacke1/Question-answering)
87
+ - Seq2Seq: [Example πŸ©Ίβš•οΈ](https://huggingface.co/spaces/awacke1/4-Seq2SeqQAT5)
88
+ - MLM: [Example πŸ©Ίβš•οΈ](https://huggingface.co/spaces/awacke1/SOTA-MedEntity)
89
+ 5. **Mapbox with AIPP Prompting Tips**: [Example πŸ©Ίβš•οΈ](https://huggingface.co/spaces/awacke1/StreamlitPydeckMapVisualViewStateForLatitudeLongitude)
90
+ 6. **Clinical Terminology** NER: [Example πŸ©Ίβš•οΈNLP Clinical Ontology Biomedical NER](https://huggingface.co/spaces/awacke1/Biomed-NLP-AI-Clinical-Terminology)
91
+
92
+ # 🌐 Curated Copy and Modify Advanced Real Time Video AI:
93
+ πŸ©Ίβš•οΈ Yolo Real Time Image Recognition from Webcam: https://huggingface.co/spaces/awacke1/Webcam-Object-Recognition-Yolo-n-Coco
94
 
95
+ # 🌐 Curated Copy and Modify Advanced NLP ASR Examples:
96
+ 1. πŸ©Ίβš•οΈ https://huggingface.co/spaces/awacke1/ASR-High-Accuracy-Test
97
+ 2. πŸ©Ίβš•οΈ https://huggingface.co/spaces/awacke1/TTS-STT-Blocks
98
+ 3. πŸ©Ίβš•οΈ https://huggingface.co/spaces/awacke1/CloneAnyVoice
 
99
 
100
+ # 🌐 Curated Copy and Modify - NLP and QA
101
+ 1. ❓ **πŸ©Ίβš•οΈ Question answering** - Answer questions posed in natural language. [Example](https://huggingface.co/spaces/awacke1/Question-answering)
102
+ 2. πŸ“Š **πŸ©Ίβš•οΈ Text classification** - Classify text into different categories. [Example](https://huggingface.co/spaces/awacke1/sileod-deberta-v3-base-tasksource-nli)
103
+ 3. πŸ’¬ **πŸ©Ίβš•οΈ Text generation** - Generate natural language text. [Example](https://huggingface.co/spaces/awacke1/Sentence2Paragraph)
104
+ 4. πŸ†• **πŸ©Ίβš•οΈ Generation of new data**: Create new data that resembles existing data. [Example](https://huggingface.co/spaces/awacke1/GenAI-Generate-New-Data-Resembling-Example)
105
+ 5. πŸ“Š **Data synthesis**: Synthesize data from multiple sources to create new datasets. [Example](https://huggingface.co/spaces/awacke1/Data-Synthesizer-Synthesize-From-Multiple-Sources)
106
+ 6. πŸ“ˆ **πŸ©Ίβš•οΈ Data augmentation**: Augment existing datasets to make them larger and more diverse. [Example](https://huggingface.co/spaces/awacke1/Data-Augmentation)
107
 
108
+ # 🌐 RLHF - Reinforcement Learning with Human Feedback - AGI Holy Grail
109
  πŸ©Ίβš•οΈ [ROUGE](https://huggingface.co/spaces/evaluate-metric/rouge)
110
  πŸ©Ίβš•οΈ [BLEU](https://huggingface.co/spaces/evaluate-metric/bleu)
111
 
112
+ # 🌐 Hospital Visualizations - AI Pair Programming Around a Theme - Try your own state with code in Prompt.
113
  πŸ©Ίβš•οΈ https://huggingface.co/spaces/awacke1/VizLib-TopLargeHospitalsMinnesota
114
  πŸ©Ίβš•οΈ https://huggingface.co/spaces/awacke1/VizLib-TopLargeHospitalsNewJersey
115
  πŸ©Ίβš•οΈ https://huggingface.co/spaces/awacke1/VizLib-TopLargeHospitalsMentalHealth
116
  πŸ©Ίβš•οΈ https://huggingface.co/spaces/awacke1/VizLib-GraphViz-Folium-MapTopLargeHospitalsinWI
117
 
118
+ # 🌐 Graphs and SVG:
119
  πŸ©Ίβš•οΈ Game Activity Graph: https://huggingface.co/spaces/awacke1/CardGameActivity-GraphViz
120
  πŸ©Ίβš•οΈ SVG Card Generation: https://huggingface.co/spaces/awacke1/VizLib-SVGWrite-Streamlit
121
 
122
+ # 🌐 Clinical Smart on FHIR:
123
  πŸ©Ίβš•οΈ https://huggingface.co/spaces/awacke1/Assessment-By-Organs
124
  πŸ©Ίβš•οΈ https://huggingface.co/spaces/awacke1/SMART-FHIR-Assessment-Test2
125
  πŸ©Ίβš•οΈ https://huggingface.co/spaces/awacke1/FHIRLib-FHIRKit