Backlinking tool & Img optimization, PIL & Tinify API

This commit is contained in:
ajaysi
2024-08-15 16:39:32 +05:30
parent d005cef45a
commit f35649f129
4 changed files with 21 additions and 13 deletions

View File

@@ -325,7 +325,7 @@ def main():
if check_api_keys() and check_llm_environs(): if check_api_keys() and check_llm_environs():
# Define the tabs # Define the tabs
tab1, tab2, tab3, tab4, tab5, tab6 = st.tabs( tab1, tab2, tab3, tab4, tab5, tab6 = st.tabs(
["AI Writers", "Content Planning", "Agents Teams", "AI SEO tools", "AI Social Tools", "Ask Alwrity"]) ["✍️🤖AI Writers", " 📝📅Content Planning", "🤝🤖Agents Teams", "🛠️🔍AI SEO tools", "📱AI Social Tools", " 💬Ask Alwrity"])
with tab1: with tab1:
ai_writers() ai_writers()

View File

@@ -4,7 +4,7 @@ import json
import requests import requests
import streamlit as st import streamlit as st
from streamlit_quill import st_quill #from streamlit_quill import st_quill
from ..gpt_providers.text_generation.main_text_generation import llm_text_gen from ..gpt_providers.text_generation.main_text_generation import llm_text_gen

View File

@@ -4,6 +4,8 @@ import json
import requests import requests
import streamlit as st import streamlit as st
from ..gpt_providers.text_generation.main_text_generation import llm_text_gen
def insta_writer(): def insta_writer():
# Title and description # Title and description
@@ -42,7 +44,7 @@ def insta_writer():
) )
if insta_captions: if insta_captions:
st.subheader('**👩👩🔬Go Viral, with these Instagram captions!🎆🎇 🎇**') st.subheader('**👩👩🔬Go Viral, with these Instagram captions!🎆🎇 🎇**')
st.code(insta_captions) st.markdown(insta_captions)
else: else:
st.error("💥**Failed to generate instagram Captions. Please try again!**") st.error("💥**Failed to generate instagram Captions. Please try again!**")
@@ -69,5 +71,10 @@ def generate_insta_captions(input_insta_keywords, input_insta_type, input_insta_
\nInstagram caption keywords: '{input_insta_keywords}'\n \nInstagram caption keywords: '{input_insta_keywords}'\n
""" """
insta_captions = generate_text_with_exception_handling(prompt)
return insta_captions try:
response = llm_text_gen(prompt)
return response
except Exception as err:
st.error(f"Exit: Failed to get response from LLM: {err}")
exit(1)

View File

@@ -4,6 +4,8 @@ import json
import requests import requests
import streamlit as st import streamlit as st
from ..gpt_providers.text_generation.main_text_generation import llm_text_gen
def tweet_writer(): def tweet_writer():
""" AI Tweet Generator """ """ AI Tweet Generator """
@@ -25,15 +27,14 @@ def tweet_writer():
) )
if st.button('**Write Tweets**'): if st.button('**Write Tweets**'):
with st.status("Assigning AI professional to write your Google Ads copy..", expanded=True) as status: if not target_audience or not hook:
if not target_audience or not hook: st.error("🚫 Please provide all required inputs.")
st.error("🚫 Please provide all required inputs.") else:
else: with st.status("Assigning AI professional to write your Google Ads copy..", expanded=True) as status:
response = tweet_generator(target_audience, hook) response = tweet_generator(target_audience, hook)
if response: if response:
st.subheader(f'**🧕👩: Your Final Tweets!**') st.subheader(f'**🧕👩: Your Tweets!**')
st.write(response) st.markdown(response)
st.write("\n\n\n\n\n\n")
else: else:
st.error("💥**Failed to write Letter. Please try again!**") st.error("💥**Failed to write Letter. Please try again!**")
@@ -67,7 +68,7 @@ def tweet_generator(target_audience, hook):
""" """
try: try:
response = generate_text_with_exception_handling(prompt) response = llm_text_gen(prompt)
return response return response
except Exception as err: except Exception as err:
st.error(f"Exit: Failed to get response from LLM: {err}") st.error(f"Exit: Failed to get response from LLM: {err}")