CoolFace
Apppublic

bellagiovanni/simple-language-model-app

sourceHugging Facemitupdated 9mo agoView on Hugging Face
0likes
App README

Simple Language Model App (Streamlit + OpenAI)

This is a very small chat application using a language model via the OpenAI API.

1) Requirements

  • Python 3.9+
  • An OpenAI API key

2) Install

bash
pip install -r requirements.txt

3) Set your API key (pick ONE)

Option A (Recommended): Streamlit secrets

  1. 1.Create folder: .streamlit
  2. 2.Create file: .streamlit/secrets.toml
  3. 3.Put:
toml
OPENAI_API_KEY="YOUR_KEY_HERE"

Option B: Environment variable

bash
export OPENAI_API_KEY="YOUR_KEY_HERE"

4) Run

bash
streamlit run app.py

What to submit

  • Upload the whole folder (or the provided ZIP) to your teacher's Google Drive folder.

If your teacher wants a “case study”, you can add 2–3 lines:

  • Goal: build a simple LLM chat app
  • Tech: Streamlit + OpenAI API
  • Features: chat history + model settings