Spaces:
Runtime error
Runtime error
Merge branch 'main' into requesting-openai-key
Browse files- utils/config.py +1 -2
- utils/haystack.py +1 -0
- utils/ui.py +2 -2
utils/config.py
CHANGED
|
@@ -2,5 +2,4 @@ import os
|
|
| 2 |
from dotenv import load_dotenv
|
| 3 |
|
| 4 |
load_dotenv()
|
| 5 |
-
TWITTER_BEARER = os.getenv('TWITTER_BEARER_TOKEN')
|
| 6 |
-
OEPN_AI_KEY = os.getenv('OPEN_AI_KEY')
|
|
|
|
| 2 |
from dotenv import load_dotenv
|
| 3 |
|
| 4 |
load_dotenv()
|
| 5 |
+
TWITTER_BEARER = os.getenv('TWITTER_BEARER_TOKEN')
|
|
|
utils/haystack.py
CHANGED
|
@@ -10,6 +10,7 @@ def start_haystack(openai_key):
|
|
| 10 |
#Use this function to contruct a pipeline
|
| 11 |
prompt_node = PromptNode(model_name_or_path="text-davinci-003", api_key=openai_key)
|
| 12 |
|
|
|
|
| 13 |
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.
|
| 14 |
You may go into some detail about what topics they tend to like tweeting about. Please also mention their overall tone, for example: positive,
|
| 15 |
negative, political, sarcastic or something else.
|
|
|
|
| 10 |
#Use this function to contruct a pipeline
|
| 11 |
prompt_node = PromptNode(model_name_or_path="text-davinci-003", api_key=openai_key)
|
| 12 |
|
| 13 |
+
|
| 14 |
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.
|
| 15 |
You may go into some detail about what topics they tend to like tweeting about. Please also mention their overall tone, for example: positive,
|
| 16 |
negative, political, sarcastic or something else.
|
utils/ui.py
CHANGED
|
@@ -19,9 +19,9 @@ def set_openai_api_key(api_key: str):
|
|
| 19 |
def sidebar():
|
| 20 |
with st.sidebar:
|
| 21 |
image = Image.open('logo/haystack-logo-colored.png')
|
| 22 |
-
st.markdown("Thanks for coming to this 🤗
|
| 23 |
"This is a project for fun, and is not a final product."
|
| 24 |
-
"There's a lot that can be improved to make this app better.\n\n"
|
| 25 |
"**Take results with a grain of** 🧂\n\n"
|
| 26 |
"For more on how this was built, instructions to run locally and to contribute: [visit GitHub](https://github.com/TuanaCelik/should-i-follow#readme)")
|
| 27 |
|
|
|
|
| 19 |
def sidebar():
|
| 20 |
with st.sidebar:
|
| 21 |
image = Image.open('logo/haystack-logo-colored.png')
|
| 22 |
+
st.markdown("Thanks for coming to this 🤗 Space.\n\n"
|
| 23 |
"This is a project for fun, and is not a final product."
|
| 24 |
+
" There's a lot that can be improved to make this app better.\n\n"
|
| 25 |
"**Take results with a grain of** 🧂\n\n"
|
| 26 |
"For more on how this was built, instructions to run locally and to contribute: [visit GitHub](https://github.com/TuanaCelik/should-i-follow#readme)")
|
| 27 |
|