Spaces:
Runtime error
Runtime error
# Install libraries | |
import streamlit as st | |
from PIL import Image | |
import streamlit as st | |
from transformers import pipeline | |
import pandas as pd | |
import plotly.express as px | |
import matplotlib.pyplot as plt | |
from pathlib import Path | |
import base64 | |
from st_pages import Page, add_page_title, show_pages | |
from streamlit_extras.badges import badge | |
# Config | |
# Initial page config | |
st.set_page_config( | |
page_title='RetrAIced', | |
page_icon=':π§ :', | |
layout="wide", | |
initial_sidebar_state="expanded", | |
) | |
def local_css(file_name): | |
with open(file_name) as f: | |
st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True) | |
local_css("style.css") | |
def img_to_bytes(img_path): | |
img_bytes = Path(img_path).read_bytes() | |
encoded = base64.b64encode(img_bytes).decode() | |
return encoded | |
show_pages( | |
[ | |
Page("app.py", "Home", "π "), | |
Page("pages/Question Answering.py", "Question Answering", ":grey_question:"), | |
Page("pages/Speech Recognition.py", "Speech Recognition", ":speaking_head_in_silhouette:"), | |
Page("pages/Summarization.py", "Summarization",":bookmark_tabs:"), | |
Page("pages/Text to Image.py", "Text to Image",":lower_left_paintbrush:"), | |
Page("pages/Text Classification.py",'Text Classification',":book:"), | |
Page("pages/Image to text.py","Image to Text",":camera:"), | |
Page("pages/Text Generation.py", "Text Generation", ":printer:"), | |
] | |
) | |
#Add streamlit logo | |
col1,col2,col3=st.columns(3) | |
with col1: | |
st.header("Intro") | |
with col3: | |
st.image("logo retraced 2.png",width=150) | |
st.write("##") | |
st.markdown( | |
""" | |
Welcome to **RetrAIced**, a user-friendly app that unifies a diverse array of AI models, offering a seamless platform for exploration and interaction. From natural language processing to image recognition, | |
the app provides a comprehensive experience, showcasing real-time demonstrations of predictive analytics and the fusion of various AI technologies. \n | |
Language models (LLMs), especially those from Hugging Face, have transformed natural language understanding and generation, becoming indispensable in today's data-driven world. | |
RetrAIced exemplifies the collaborative potential of AI by breaking down barriers between different models, making their collective power accessible to users of all backgrounds. | |
The app invites developers, data enthusiasts, and the curious to explore and experiment with models for tasks like Question Answering, Speech Recognition, Summarization, Text | |
Classification, and Text Generation. This unified experience paves the way for a connected and intelligent digital world, where projects can become more versatile, efficient, and engaging.\n | |
Join the creator on an exciting journey into the world of language models through RetrAIced, unlocking a universe of possibilities and transforming complexities into a unified and intuitive AI experience. | |
""" | |
, unsafe_allow_html=True) | |
st.write("##") | |
st.write("##") | |
#Create 2 columns to add github repo and huggging face repo | |
left_col, right_col = st.columns(2) | |
with left_col: | |
st.info('**Hugging Face: [@JavierGon12](https://huggingface.co/JavierGon12)**', icon="π‘") | |
with right_col: | |
badge(type='github',name='JaviGon12') | |
#st.info('**GitHub: [@JaviGon12](https://github.com/JaviGon12)**', icon="π»") | |