Spaces:
Build error
Build error
Commit
·
f5615fe
1
Parent(s):
1c6c2c1
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,14 +18,8 @@ from audio_recorder_streamlit import audio_recorder
|
|
| 18 |
import streamlit as st
|
| 19 |
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
st.set_page_config(page_title="GPT Streamlit Document Reasoner",layout="wide")
|
| 24 |
|
| 25 |
-
menu = ["htm", "txt", "xlsx", "csv", "md", "py"] #619
|
| 26 |
-
choice = st.sidebar.selectbox("Output File Type:", menu)
|
| 27 |
-
model_choice = st.sidebar.radio("Select Model:", ('gpt-3.5-turbo', 'gpt-3.5-turbo-0301'))
|
| 28 |
-
|
| 29 |
def generate_filename(prompt, file_type):
|
| 30 |
central = pytz.timezone('US/Central')
|
| 31 |
safe_date_time = datetime.now(central).strftime("%m%d_%I%M")
|
|
@@ -153,7 +147,6 @@ def main():
|
|
| 153 |
if api_key:
|
| 154 |
openai.api_key = api_key
|
| 155 |
|
| 156 |
-
|
| 157 |
|
| 158 |
user_prompt = st.text_area("Enter prompts, instructions & questions:", '', height=100)
|
| 159 |
|
|
@@ -215,6 +208,11 @@ def main():
|
|
| 215 |
if st.button("🗑", key="delete_"+file):
|
| 216 |
os.remove(file)
|
| 217 |
st.experimental_rerun()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
|
| 219 |
else:
|
| 220 |
st.error("Please provide the OpenAI API Key either through the input box or set the OPENAI_KEY environment variable.")
|
|
|
|
| 18 |
import streamlit as st
|
| 19 |
|
| 20 |
|
|
|
|
|
|
|
| 21 |
st.set_page_config(page_title="GPT Streamlit Document Reasoner",layout="wide")
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
def generate_filename(prompt, file_type):
|
| 24 |
central = pytz.timezone('US/Central')
|
| 25 |
safe_date_time = datetime.now(central).strftime("%m%d_%I%M")
|
|
|
|
| 147 |
if api_key:
|
| 148 |
openai.api_key = api_key
|
| 149 |
|
|
|
|
| 150 |
|
| 151 |
user_prompt = st.text_area("Enter prompts, instructions & questions:", '', height=100)
|
| 152 |
|
|
|
|
| 208 |
if st.button("🗑", key="delete_"+file):
|
| 209 |
os.remove(file)
|
| 210 |
st.experimental_rerun()
|
| 211 |
+
|
| 212 |
+
#sidebar
|
| 213 |
+
menu = ["htm", "txt", "xlsx", "csv", "md", "py"] #619
|
| 214 |
+
choice = st.sidebar.selectbox("Output File Type:", menu)
|
| 215 |
+
model_choice = st.sidebar.radio("Select Model:", ('gpt-3.5-turbo', 'gpt-3.5-turbo-0301'))
|
| 216 |
|
| 217 |
else:
|
| 218 |
st.error("Please provide the OpenAI API Key either through the input box or set the OPENAI_KEY environment variable.")
|