File size: 1,239 Bytes
1da3bb7 1b9bc6d 1da3bb7 1b9bc6d 1da3bb7 1b9bc6d 1da3bb7 1b9bc6d 1da3bb7 1b9bc6d 1da3bb7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import streamlit as st
st.set_page_config(
page_title="LLM Open Generation Bias",
page_icon="👋",
)
st.title('Gender Bias Analysis in Text Generation')
st.write("Welcome to the Gender Bias Analysis app. This application generates text using a GPT-2 model and compares the regard (perceived respect or opinion) in the generated texts for male and female prompts.")
st.markdown(
"""
## Description
This demo showcases how language models can exhibit gender bias. We load a dataset of prompts associated with male and female American actors and generate continuations using a GPT-2 model. By analyzing the generated text, we can observe potential biases in the model's output. The regard (perceived respect or opinion) scores are computed and compared for both male and female continuations.
"""
)
# Sidebar content
st.sidebar.title("Gender Bias Analysis Demo")
st.sidebar.subheader("Instructions")
st.sidebar.markdown(
"""
1. Enter the password to access the demo.
2. The app will load the BOLD dataset and sample prompts for male and female actors.
3. It will generate text continuations using the GPT-2 model.
4. The regard scores will be computed and displayed for comparison.
"""
)
|