import streamlit as st import plotly.graph_objs as go from transform_word import transform_word st.title("Transformer Contextual Text Generator with Real-Time Graph") # Input from user word = st.text_input("Enter a word or phrase") if word: significant_numbers = transform_word(word) # Plotting fig = go.Figure(data=go.Scatter(y=significant_numbers, mode='lines+markers')) fig.update_layout(title='Real-Time Graph', xaxis_title='Character Index', yaxis_title='Significant Number') st.plotly_chart(fig)