# Import necessary libraries import streamlit as st from transformers import pipeline # Load the text generation pipeline from Hugging Face generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B') # Title of the app st.title('eyEar Assistant') # Display introductory text st.write("Welcome to eyEar, an AI assistant designed for the visually impaired. You can interact with the assistant by typing messages below.") # Input box for user to type their message user_input = st.text_input("Type a message to interact with eyEar:") # If the user enters a message if user_input: # Generate a response using the Hugging Face model response = generator(user_input, max_length=50, num_return_sequences=1) # Display the assistant's response st.write(f"eyEar Response: {response[0]['generated_text']}")