Spaces:
Sleeping
Sleeping
Linh Vuu
commited on
Commit
•
9d5cf28
1
Parent(s):
a3c3323
removed apikeys
Browse files- .DS_Store +0 -0
- .gitignore +1 -0
- app.py +4 -15
.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
.streamlit
|
app.py
CHANGED
@@ -1,24 +1,13 @@
|
|
1 |
import openai
|
2 |
-
import os
|
3 |
-
from dotenv import find_dotenv, load_dotenv
|
4 |
import time
|
5 |
-
import logging
|
6 |
from datetime import datetime
|
7 |
import requests
|
8 |
import json
|
9 |
import streamlit as st
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
# if you saved the key under a different environment variable name, you can do something like:
|
15 |
-
# client = OpenAI(
|
16 |
-
# api_key=os.environ.get("CUSTOM_ENV_NAME"),
|
17 |
-
# )
|
18 |
-
|
19 |
-
news_api_key = '398bee7b77d64d63af02cd1d2541b210'
|
20 |
-
|
21 |
-
client = openai.OpenAI(api_key='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')
|
22 |
model = "gpt-3.5-turbo-16k"
|
23 |
|
24 |
|
@@ -204,7 +193,7 @@ def main():
|
|
204 |
|
205 |
with st.form(key="user_input_form"):
|
206 |
instructions = st.text_input("Enter topic:")
|
207 |
-
submit_button = st.form_submit_button(label="Summarise for
|
208 |
|
209 |
if submit_button:
|
210 |
manager.create_assistant(
|
|
|
1 |
import openai
|
|
|
|
|
2 |
import time
|
|
|
3 |
from datetime import datetime
|
4 |
import requests
|
5 |
import json
|
6 |
import streamlit as st
|
7 |
|
8 |
+
news_api_key = st.secrets["news_api_key"]
|
9 |
+
openai_api_key = st.secrets["openai_api_key"]
|
10 |
+
client = openai.OpenAI(api_key = openai_api_key)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
model = "gpt-3.5-turbo-16k"
|
12 |
|
13 |
|
|
|
193 |
|
194 |
with st.form(key="user_input_form"):
|
195 |
instructions = st.text_input("Enter topic:")
|
196 |
+
submit_button = st.form_submit_button(label="Summarise for người đẹp Tú Anh")
|
197 |
|
198 |
if submit_button:
|
199 |
manager.create_assistant(
|