mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
5a511f02af
* push * chat interface * remove video artifact * changes * restore * changes * more functions * clean * chat interface * chat interface * Update gradio/chat_interface.py * nit * changes * api fix * chat interface * guide * guide * changes * fixes * Added ChatInterface Examples for Langchain, OpenAI Streaming, and HF's Text Generation Inference (StarChat) * docstring * tests * tests * tests * tests * rename * guide * chatbot * conclusion * demo notebooks * clog * test * chat interface * fixes * functional test * test * notebook * guides * typing * docstring * script * upgrade pyright * upgrade pyright * Update CHANGELOG.md * revert pyright upgrade * typing * redirects * Update CHANGELOG.md * guide * guide * readme * screenshot * add to readme * quickstart * readme * Added transformers open-source LLM example using ChatInterface * Minor nits to guide * Minor tweak to test - use connect fixture * website fixes * nav * guide * fix tests' * fix * type * clear * chat interface * fix test * fix guide * handle edge case * edge case * typing * fix example caching with streaming * typing --------- Co-authored-by: pngwn <hello@pngwn.io> Co-authored-by: Yuvraj Sharma <48665385+yvrjsharma@users.noreply.github.com> Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com> Co-authored-by: aliabd <ali.si3luwa@gmail.com>
11 lines
202 B
Python
11 lines
202 B
Python
import random
|
|
import gradio as gr
|
|
|
|
def random_response(message, history):
|
|
return random.choice(["Yes", "No"])
|
|
|
|
demo = gr.ChatInterface(random_response)
|
|
|
|
if __name__ == "__main__":
|
|
demo.launch()
|