Add files
Browse filesFiles changed (6)
- .pre-commit-config.yamlAdded+55
- .vscode/settings.jsonAdded+26
- README.md+3-3
- app.pyAdded+21
- cats.jpgAdded
- dogs.jpgAdded
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - id: check-executables-have-shebangs - id: check-json - id: check-merge-conflict - id: check-shebang-scripts-are-executable - id: check-toml - id: check-yaml - id: end-of-file-fixer - id: mixed-line-ending args: ["--fix=lf"] - id: requirements-txt-fixer - id: trailing-whitespace - repo: https://github.com/myint/docformatter rev: v1.7.5 hooks: - id: docformatter args: ["--in-place"] - repo: https://github.com/pycqa/isort rev: 5.13.2 hooks: - id: isort args: ["--profile", "black"] - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.8.0 hooks: - id: mypy args: ["--ignore-missing-imports"] additional_dependencies: ["types-python-slugify", "types-requests", "types-PyYAML"] - repo: https://github.com/psf/black rev: 23.12.1 hooks: - id: black language_version: python3.10 args: ["--line-length", "119"] - repo: https://github.com/kynan/nbstripout rev: 0.6.1 hooks: - id: nbstripout args: [ "--extra-keys", "metadata.interpreter metadata.kernelspec cell.metadata.pycharm", ] - repo: https://github.com/nbQA-dev/nbQA rev: 1.7.1 hooks: - id: nbqa-black - id: nbqa-pyupgrade args: ["--py37-plus"] - id: nbqa-isort args: ["--float-to-top"]1234567891011121314151617181920212223242526{ "editor.formatOnSave": true, "files.insertFinalNewline": false, "[python]": { "editor.defaultFormatter": "ms-python.black-formatter", "editor.formatOnType": true, "editor.codeActionsOnSave": { "source.organizeImports": "explicit" } }, "[jupyter]": { "files.insertFinalNewline": false }, "black-formatter.args": [ "--line-length=119" ], "isort.args": ["--profile", "black"], "flake8.args": [ "--max-line-length=119" ], "ruff.lint.args": [ "--line-length=119" ], "notebook.output.scrolling": true, "notebook.formatOnCellExecution": true}12345678---title: Multimodal Chat Cache Examplesemoji: 📚colorFrom: pinkcolorTo: greensdk: gradiosdk_version: 4.40.0app_file: app.py12345678---title: Multimodal Chat Cache Examplesemoji: ⚡colorFrom: graycolorTo: yellowsdk: gradiosdk_version: 4.40.0app_file: app.py
123456789101112131415161718192021import gradio as gr
def run(message, history): return message["text"]
examples = [ { "text": "hey", "files": ["cats.jpg"], },]
demo = gr.ChatInterface( fn=run, multimodal=True, examples=examples, cache_examples=True,)demo.queue().launch().pre-commit-config.yamlAdded+55
.vscode/settings.jsonAdded+26
README.md+3-3
app.pyAdded+21
cats.jpgAdded

dogs.jpgAdded
