awacke1 commited on
Commit
09bd973
Β·
1 Parent(s): 2c9e94d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -10
app.py CHANGED
@@ -1,4 +1,6 @@
1
  import streamlit as st
 
 
2
  import openai
3
  import os
4
  import base64
@@ -14,6 +16,8 @@ import time
14
  import re
15
  import textract
16
  import zipfile # New import for zipping files
 
 
17
  from datetime import datetime
18
  from openai import ChatCompletion
19
  from xml.etree import ElementTree as ET
@@ -29,23 +33,40 @@ from langchain.chat_models import ChatOpenAI
29
  from langchain.memory import ConversationBufferMemory
30
  from langchain.chains import ConversationalRetrievalChain
31
  from templates import css, bot_template, user_template
32
- import streamlit.components.v1 as components # Import Streamlit Components for HTML5
33
 
34
  # page config and sidebar declares up front allow all other functions to see global class variables
35
  st.set_page_config(page_title="GPT Streamlit Document Reasoner", layout="wide")
36
  should_save = st.sidebar.checkbox("πŸ’Ύ Save", value=True)
37
 
38
- # Whisper Paper - how open STT suddenly got so good:
39
- # st link button with emoji anyone?
40
- url="https://arxiv.org/pdf/2212.04356.pdf"
41
- import random
42
- def link_button_with_emoji(url):
43
  emojis = ["πŸ’‰", "πŸ₯", "🌑️", "🩺", "🌑️", "πŸ”¬", "πŸ’Š", "πŸ§ͺ", "πŸ‘¨β€βš•οΈ", "πŸ‘©β€βš•οΈ"]
44
  random_emoji = random.choice(emojis)
45
- st.markdown(f"[{random_emoji} Whisper Paper - Robust Speech Recognition via Large-Scale Weak Supervision]({url})")
46
- url = "https://arxiv.org/pdf/2212.04356.pdf"
47
- link_button_with_emoji(url)
48
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
 
50
 
51
  def generate_filename_old(prompt, file_type):
 
1
  import streamlit as st
2
+ import streamlit.components.v1 as components
3
+
4
  import openai
5
  import os
6
  import base64
 
16
  import re
17
  import textract
18
  import zipfile # New import for zipping files
19
+ import random
20
+
21
  from datetime import datetime
22
  from openai import ChatCompletion
23
  from xml.etree import ElementTree as ET
 
33
  from langchain.memory import ConversationBufferMemory
34
  from langchain.chains import ConversationalRetrievalChain
35
  from templates import css, bot_template, user_template
 
36
 
37
  # page config and sidebar declares up front allow all other functions to see global class variables
38
  st.set_page_config(page_title="GPT Streamlit Document Reasoner", layout="wide")
39
  should_save = st.sidebar.checkbox("πŸ’Ύ Save", value=True)
40
 
41
+
42
+ def link_button_with_emoji(url, title, emoji_summary):
 
 
 
43
  emojis = ["πŸ’‰", "πŸ₯", "🌑️", "🩺", "🌑️", "πŸ”¬", "πŸ’Š", "πŸ§ͺ", "πŸ‘¨β€βš•οΈ", "πŸ‘©β€βš•οΈ"]
44
  random_emoji = random.choice(emojis)
45
+ st.markdown(f"[{random_emoji} {emoji_summary} - {title}]({url})")
46
+
47
+ # MemGPT Paper
48
+ url_memgpt = "https://arxiv.org/abs/2310.08560"
49
+ title_memgpt = "MemGPT"
50
+ emoji_summary_memgpt = "πŸ§ πŸ’Ύ Memory OS"
51
+ link_button_with_emoji(url_memgpt, title_memgpt, emoji_summary_memgpt)
52
+
53
+ # AutoGen Paper
54
+ url_autogen = "https://arxiv.org/abs/2308.08155"
55
+ title_autogen = "AutoGen"
56
+ emoji_summary_autogen = "πŸ€–πŸ”— Multi-Agent LLM"
57
+ link_button_with_emoji(url_autogen, title_autogen, emoji_summary_autogen)
58
+
59
+ # Whisper Paper
60
+ url_whisper = "https://arxiv.org/abs/2212.04356"
61
+ title_whisper = "Whisper"
62
+ emoji_summary_whisper = "πŸ”ŠπŸ§‘β€πŸš€ Robust STT"
63
+ link_button_with_emoji(url_whisper, title_whisper, emoji_summary_whisper)
64
+
65
+ # ChatDev Paper
66
+ url_chatdev = "https://arxiv.org/pdf/2307.07924.pdf"
67
+ title_chatdev = "ChatDev"
68
+ emoji_summary_chatdev = "πŸ’¬πŸ’» Comm. Agents"
69
+ link_button_with_emoji(url_chatdev, title_chatdev, emoji_summary_chatdev)
70
 
71
 
72
  def generate_filename_old(prompt, file_type):