| |
| import streamlit as st |
| from transformers import pipeline |
|
|
| |
| generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B') |
|
|
| |
| st.title('eyEar Assistant') |
|
|
| |
| st.write("Welcome to eyEar, an AI assistant designed for the visually impaired. You can interact with the assistant by typing messages below.") |
|
|
| |
| user_input = st.text_input("Type a message to interact with eyEar:") |
|
|
| |
| if user_input: |
| |
| response = generator(user_input, max_length=50, num_return_sequences=1) |
| |
| |
| st.write(f"eyEar Response: {response[0]['generated_text']}") |
|
|