Todos Nuevo

user:thomas gists creados por el usuario

title:mygist gists con el título indicado

filename:myfile.txt gists que contienen archivos con el nombre indicado

extension:yml gists que contienen archivos con la extensión indicada

language:go gists que contienen archivos con el lenguaje indicado

topic:homelab gists with given topic

Iniciar sesión


Todos Nuevo Iniciar sesión

All gists matching topic chat-app

Recientemente creado
Menos reciente creado
Recientemente actualizado
Menos reciente actualizado

timmy / Streamlit 聊天應用示範

0 gustos
0 bifurcaciones
1 archivos
Última actividad 10 months ago
此範例展示如何使用 Streamlit 建立簡單的聊天應用,模擬 AI 助手回應使用者輸入。利用 st.chat_message 來顯示對話歷史,並透過 st.chat_input 來獲取使用者輸入,使應用具備互動性,適合用於 AI 對話介面開發。
chat-app interactive-gui llm python streamlit ui-design
1 import streamlit as st
2 import random
3 import time
4
5 st.write("Streamlit loves LLMs! 🤖 [Build your own chat app](https://docs.streamlit.io/develop/tutorials/llms/build-conversational-apps) in minutes, then make it powerful by adding images, dataframes, or even input widgets to the chat.")
6
7 st.caption("Note that this demo app isn't actually connected to any LLMs. Those are expensive ;)")
8
9 # Initialize chat history
10 if "messages" not in st.session_state:
Siguiente Anterior

Desarrollado por Opengist ⋅ Load: 17ms⋅

Español
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文