Spaces:
Running
Running
fixing some typos
Browse files- utils/config.py +1 -1
- utils/haystack.py +2 -2
- utils/ui.py +2 -2
utils/config.py
CHANGED
@@ -3,4 +3,4 @@ from dotenv import load_dotenv
|
|
3 |
|
4 |
load_dotenv()
|
5 |
TWITTER_BEARER = os.getenv('TWITTER_BEARER_TOKEN')
|
6 |
-
|
|
|
3 |
|
4 |
load_dotenv()
|
5 |
TWITTER_BEARER = os.getenv('TWITTER_BEARER_TOKEN')
|
6 |
+
OPEN_AI_KEY = os.getenv('OPEN_AI_KEY')
|
utils/haystack.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import streamlit as st
|
2 |
import requests
|
3 |
-
from utils.config import TWITTER_BEARER,
|
4 |
|
5 |
from haystack.nodes import PromptNode, PromptTemplate
|
6 |
|
@@ -10,7 +10,7 @@ from haystack.nodes import PromptNode, PromptTemplate
|
|
10 |
)
|
11 |
def start_haystack():
|
12 |
#Use this function to contruct a pipeline
|
13 |
-
prompt_node = PromptNode(model_name_or_path="text-davinci-003", api_key=
|
14 |
|
15 |
twitter_template = PromptTemplate(name="twitter-voice", prompt_text="""You will be given a twitter stream belonging to a specific profile. Answer with a summary of what they've lately been tweeting about and in what languages.
|
16 |
You may go into some detail about what topics they tend to like tweeting about. Please also mention their overall tone, for example: positive,
|
|
|
1 |
import streamlit as st
|
2 |
import requests
|
3 |
+
from utils.config import TWITTER_BEARER, OPEN_AI_KEY
|
4 |
|
5 |
from haystack.nodes import PromptNode, PromptTemplate
|
6 |
|
|
|
10 |
)
|
11 |
def start_haystack():
|
12 |
#Use this function to contruct a pipeline
|
13 |
+
prompt_node = PromptNode(model_name_or_path="text-davinci-003", api_key=OPEN_AI_KEY)
|
14 |
|
15 |
twitter_template = PromptTemplate(name="twitter-voice", prompt_text="""You will be given a twitter stream belonging to a specific profile. Answer with a summary of what they've lately been tweeting about and in what languages.
|
16 |
You may go into some detail about what topics they tend to like tweeting about. Please also mention their overall tone, for example: positive,
|
utils/ui.py
CHANGED
@@ -15,9 +15,9 @@ def reset_results(*args):
|
|
15 |
def sidebar():
|
16 |
with st.sidebar:
|
17 |
image = Image.open('logo/haystack-logo-colored.png')
|
18 |
-
st.markdown("Thanks for coming to this 🤗
|
19 |
"This is a project for fun, and is not a final product."
|
20 |
-
"There's a lot that can be improved to make this app better.\n\n"
|
21 |
"**Take results with a grain of** 🧂\n\n"
|
22 |
"For more on how this was built, instructions to run locally and to contribute: [visit GitHub](https://github.com/TuanaCelik/should-i-follow#readme)")
|
23 |
|
|
|
15 |
def sidebar():
|
16 |
with st.sidebar:
|
17 |
image = Image.open('logo/haystack-logo-colored.png')
|
18 |
+
st.markdown("Thanks for coming to this 🤗 Space.\n\n"
|
19 |
"This is a project for fun, and is not a final product."
|
20 |
+
" There's a lot that can be improved to make this app better.\n\n"
|
21 |
"**Take results with a grain of** 🧂\n\n"
|
22 |
"For more on how this was built, instructions to run locally and to contribute: [visit GitHub](https://github.com/TuanaCelik/should-i-follow#readme)")
|
23 |
|