This Streamlit app uses the Google Generative AI API to generate stories based on user prompts. Users can input a prompt, generate a story, and clear the response.
To run the app locally, follow these steps:
Make sure you have Python and pip installed on your system.
pip install streamlit
Clone the repository:
git clone https://github.com/yourusername/story-generator-app.git
Navigate to the project directory:
cd story-generator-app
Install dependencies:
pip install -r requirements.txt
Run the Streamlit app:
streamlit run app.py
The app will be accessible in your web browser at http://localhost:8501.
Enter a prompt in the provided text input. Click the "Generate Story" button to generate a story based on the prompt. The generated story will be displayed under the prompt. Click the "Clear Response" button to clear the generated story.
Make sure to set up your API key for the Google Generative AI API by adding it to the .env file in the project root:
env
GEMINI_API_KEY=your_actual_api_key Replace your_actual_api_key with your real Gemini API key.
This project is licensed under the MIT License - see the LICENSE file for details.
Google Generative AI Streamlit python-dotenv
Feel free to contribute and improve the app!
vbnet
Replace yourusername
in the repository URL with your actual GitHub username if you decide to host the code on GitHub. Adjust the content and structure as needed based on your preferences and additional information about the project.
Tutorial at gemini
Learn prompt engineering