towardsinnovationlab commited on
Commit
f833cd2
Β·
verified Β·
1 Parent(s): a41c2f0

Upload 3 files

Browse files
Files changed (3) hide show
  1. 1_app.py +22 -0
  2. README.md +4 -9
  3. copy_button.html +39 -0
1_app.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+
4
+
5
+ # Title and caption
6
+ st.title("πŸ’¬ AI Chatbot development")
7
+ st.caption("πŸš€ Your Personal AI Assistant helping in your activities")
8
+
9
+
10
+ with st.sidebar:
11
+ st.write("check out this [article](https://medium.com/@c.giancaterino/build-your-personal-ai-assistant-with-streamlit-and-llms-2f95c9b00e0b)")
12
+
13
+
14
+ st.markdown("""
15
+ **πŸ‘ˆ Select a page from the dropdown on the left** to see some applications of the app!""")
16
+
17
+
18
+
19
+ st.image("./images/magicstudio-art_ai_1.jpg", width=500)
20
+
21
+
22
+
README.md CHANGED
@@ -1,10 +1,5 @@
1
- ---
2
- title: AI Chatbot
3
- emoji: πŸ†
4
- colorFrom: gray
5
- colorTo: blue
6
- sdk: docker
7
- pinned: false
8
- ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
1
+ # AI_Personal_Assistant
 
 
 
 
 
 
 
2
 
3
+ Read the article on [medium](https://medium.com/@c.giancaterino/build-your-personal-ai-assistant-with-streamlit-and-llms-2f95c9b00e0b)
4
+
5
+ Go to the [app](https://aipersonalassistant.streamlit.app/)
copy_button.html ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <meta charset="UTF-8">
4
+ <title>Copy Text to Clipboard</title>
5
+ <meta http-equiv="Content-Security-Policy" content="frame-ancestors 'self' *">
6
+ <style>
7
+ #copyButton {
8
+ transition: opacity 1s;
9
+ }
10
+ </style>
11
+ </head>
12
+ <body>
13
+ <input type="text" id="textToCopy" value="" style="position: absolute; left: -9999px;">
14
+ <button id="copyButton" onclick="copyToClipboard()">πŸ“‹</button>
15
+ <script>
16
+ function getQueryParam(name) {
17
+ const urlSearchParams = new URLSearchParams(window.location.search);
18
+ return urlSearchParams.get(name);
19
+ }
20
+ const textToCopy = document.getElementById("textToCopy");
21
+ const copyText = getQueryParam("copy");
22
+ if (copyText) {
23
+ textToCopy.value = decodeURIComponent(copyText);
24
+ }
25
+ const copyButton = document.getElementById("copyButton");
26
+ copyButton.title = textToCopy.value;
27
+ function copyToClipboard() {
28
+ textToCopy.select();
29
+ document.execCommand("copy");
30
+ const clipboardContents = textToCopy.value;
31
+ copyButton.textContent = "βœ”";
32
+ setTimeout(function () {
33
+ copyButton.textContent = "πŸ“‹";
34
+ copyButton.title = textToCopy.value;
35
+ }, 1000);
36
+ }
37
+ </script>
38
+ </body>
39
+ </html>