Spaces:
Sleeping
Sleeping
import streamlit as st | |
################################ | |
####### Generic functions ###### | |
################################ | |
def option_change(): | |
st.session_state.input_text="Hello" | |
def button_clicked(): | |
st.session_state.output_text="Button Clicked" | |
################################ | |
####### Display of data ######## | |
################################ | |
st.set_page_config(layout='wide') | |
# Title | |
st.title("LLM Basics Demo - with Huggingface Pipeline()") | |
# 3 Column Layout | |
col1, col2, col3 = st.columns(3) | |
with col1: | |
options = ["Sentiment Analysis", "Zero-shot Classification", "Text Generation","Mask Filling","Named Entity Recognition","Question & Answering","Summarization","English to French Translation"] | |
llm_action_type = st.selectbox("Select LLM Tasktype", options,key="action_type", on_change=option_change) | |
with col3: | |
llm_button = st.button("Generate Data",on_click=button_clicked) | |
# Display Input in single Layout | |
llm_input_text = st.text_area(label="Enter your message",key="input_text", height=400) | |
# Display Output in single Layout | |
llm_output_text = st.text_area("Generate Output",key="output_text", height=400) |