Commit Graph

219 Commits

Author SHA1 Message Date
pngwn
1419538ea7
Refactor component directories (#5074)
* asd

* changes

* fix everything

* cleanup

* add changeset

* fix casing

* lockfile

* fix casing

* fix ci, enable linting

* fix test

* add changeset

* add changeset

* delete changeset

* fix dirs

* fix casing

* fix notebooks

* fix casing

* fix casing

* fix casing

* fix casing

* fix casing

* fix casing

* fix casing

* fix casing

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-03 23:01:18 +01:00
Abubakar Abid
7d89716519
gr.Dropdown now has correct behavior in static mode as well as when an option is selected (#5062)
* dropdown fixes

* add changeset

* add changeset

* guide

* guide

* stories

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-02 12:32:45 -04:00
Freddy Boulton
46e4ef67d2
Deploy ChatInterface as a discord bot (#4960)
* WIP

* Handle queue full message

* Add code

* Fix types

* Format

* Add docstring

* Rephrase

* cli conflicts

* Update client/python/gradio_client/templates/discord_chat.py

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* WIP

* Handle queue full message

* Add code

* Fix types

* Format

* Add docstring

* Rephrase

* cli conflicts

* Update client/python/gradio_client/templates/discord_chat.py

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Update client/python/gradio_client/templates/discord_chat.py

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Update client/python/gradio_client/templates/discord_chat.py

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Update client/python/gradio_client/templates/discord_chat.py

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Figure out how slash commands work

* Lint

* Fix new name situation

* Dont auto archive

* add code

* Explain sync

* add changeset

* Update client/python/gradio_client/cli/deploy_discord.py

Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>

* Make more general

* Fix check

* add changeset

* Add guide

* Step-by-step guide

* Add tip on login via cli

* Fix template - auto synch

* Add note on space sleeptime

* add changeset

* Add more info for feature

* Add img

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
2023-07-26 16:09:38 -04:00
Ali Abdalla
71c9039401
Make sure tags aren't rendered inside a guide (#5007)
* remove tags

* small fixes to guides

* add changeset

* add changeset

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-07-24 22:54:33 +02:00
fabiencro
e549bf10c7
Documentation: made correct example for the .then() event listener method (#5003)
* Documentation: made correct example for the .then() event listener method

* Fix notebook

---------

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2023-07-24 15:39:27 -04:00
Abubakar Abid
b74f845303
Adds additional_inputs to gr.ChatInterface (#4985)
* adding additional inputs

* add param

* guide

* add is_rendered

* add demo

* fixing examples

* add test

* guide

* add changeset

* Fix typos

* Remove label

* Revert "Remove label"

This reverts commit 1004285615.

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2023-07-24 11:55:47 -04:00
Luke Cheng
4b0e98e40a
docs: Initiate the Chinese translation (#4767)
* docs: init for the chs translation

* docs: translate guides to Chinese. (#1)

* 翻译文档

* update ChangeLog

* docs: add spaces with the heyspace tool

* 翻译文档

* docs: add spaces to the follow-up files

---------

Co-authored-by: Luke Cheng <2258420+chenglu@users.noreply.github.com>

* ignore cn dir in website

---------

Co-authored-by: TERRY LEE <59245973+liteli1987gmail@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2023-07-24 14:10:39 +02:00
Abubakar Abid
c93c317bb8
chat interface example code fix (#4984) 2023-07-20 14:05:46 +03:00
Abubakar Abid
3222688f7a
fix langchain, openai examples (#4961) 2023-07-18 15:54:15 -04:00
Abubakar Abid
5a511f02af
A high-level ChatInterface abstraction (#4869)
* 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>
2023-07-17 13:22:47 -04:00
Ali Abdalla
059d77eb98
Fix broken images in guides and website meta tags (#4830)
* testing meta tags

* fix broken images in guides
2023-07-07 20:51:42 +03:00
Ali Abdalla
b091c9165e
Fixes some issues with website migration (#4806)
* use _main embedded components

* fix horizontal scrolling in guide

* update guide headers on nav bar

* testing with redirects

* testing with trailingslash
2023-07-06 18:00:36 +03:00
aliabid94
b8eb481473
Share button (#4651)
* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* restore

* merge

* del image'

* update pnpm lock

* changes

* changes

* changes

* changes

* changes

* Update CHANGELOG.md

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* changes

* fix

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* chagnes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: pngwn <hello@pngwn.io>
2023-07-05 19:50:17 -05:00
Ali Abdalla
cd693708cf
Converting the website into sveltekit (#3437)
* index page

* demos page

* guides gallery page

* guides

* some docs work

* changes

* changes

* docs work

* refactor some to ssr

* more refactoring

* add metatags

* add special docs pages and improve nav

* fix prev next in combining

* add changelog

* Site slugs for new website (#3431)

* safe slugs for docs

* add slugs to guides

* changes

* add flagging

---------

Co-authored-by: aliabd <ali.si3luwa@gmail.com>

* make anchor tags visible on hover

* add anchor tags to docs

* fix @html in codeblocks

* fix demos in guides

* syntax highlighting code in example usage

* fix @html in changelog

* fix contributing lin

* fix assets in guides

* fix broken assets on build

* error page

* fix meta tags updating

* move guides to be /guides/[guide] instead of /[guide]

* add headers to sections and make them linkable - freddy feedback

* add guides section to docs

* tighten width and add second nav bar

* styling second nav bar

* smooth scrolling in docs and guides

* make components clickable in event listener graph

* load latest gradio.js

* menu bar on docs mobile

* scrolling highlight menu and remove base docs page

* vercel

* refactor guides

* fix slugs in docs

* fix &lt; and code formatting in guides

* added search

* redirect all old links

* fix bad merge

* fix paths

* Fix css issue with spaces logo

* add status page link to footer

* add themes to docs

* fix new documentation.py path

* add python client docs

* make docs faster

* add clients ot docs

* colors

* convert to adapter static

* prerender

* fix broken paths in guides

* fix broken slugs

* Aliabd/website sveltekit test (#4572)

* fixes to paths

* fixes

* typechecking

* fix

* fix

* fix

* types lib

* more type fixes

* extends fix

* typing fix

* typing fix

* json typing fix

* add jsons

* rollup

* tweak

* fix lockfile

* fix maybe

* fix maybe

* changes

* ui functional fix

* oops

* pnpm version

* fix app

---------

Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-07-04 16:33:22 +03:00
aliabid94
5dbf84dd15
Fix code render in key features (#4777) 2023-07-03 18:28:40 -05:00
aliabid94
6c5427230e
Create Warning, Info modals (#4518)
* changes

* changes

* changes

* changes

* changes

* Styling for error, warning and info toasts (#4603)

* create abstract toast component for info/warning/error

* add icons

* add light mode theming

* add theme mode check and dark mode styles

* update theme_mode on update

* clean up render of toast content

* replace dynamic css vars with toast type css selectors

* tweak colours

* change error pill border colour to align with toasts

* formatting

* fix failed test

* rename icon files and clean up css

* changes

* changes

* changes

* changes

* changes

* changes

* chanegs

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
2023-07-03 16:28:39 -05:00
Abubakar Abid
409593e9cc
Updates to the API endpoints / docs, and fixing the Theme builder (#4683)
* view API fixes

* code snippet js

* changelog

* api name false

* examples

* client trigger tests

* fix typecheck

* black

* type

* typing

* typing

* update gif

* type ignore

* added tests

* format

* added test

* test

* fix guides

* snippet

* tests

* fix tests

* add test

* fix typing

* fix test

* remove comments
2023-06-29 14:05:25 -05:00
Dawood Khan
ed5178acd3
Revert "Remove chatbot_streaming from guide" (#4730)
* Revert "remove chatbot_streaming from guide (#4729)"

This reverts commit 21c0198da1.

* bring back streaming demo
2023-06-29 11:11:38 -04:00
Ali Abdalla
21c0198da1
remove chatbot_streaming from guide (#4729) 2023-06-29 18:48:37 +04:00
codecoaster
ee37a76906
Update 05_using-blocks-like-functions.md (#4513)
"space" here should be replaced with "Blocks"

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2023-06-14 12:19:19 -04:00
Freddy Boulton
afcc20801e
Deprecate python 3.7 (#4484)
* Remove versions from 3.7

* CHANGELOG

* from typing import Literal

* Remaning places 3.7

* Last few spots

* Use 3.8 in lint
2023-06-13 21:52:33 -04:00
Abubakar Abid
4729457929
Add a gr.ClearButton (#4456)
* clear button

* restore

* button in interface

* changelog

* fixes

* simplify

* changes

* components

* changed dropdown behavior

* fix label

* add tests

* update demos

* changelog

* changelog

* restore

* formatting

* revert dropdown

* frontend changes

* other fixes

* changelog

* update guide

* future

* fix tests

* fix tests

* fix tests

* changelog

* update guide
2023-06-13 19:18:14 -05:00
aliabid94
ff6e676a92
Remove style parameter (#4374)
* changes

* changes

* changes

* changes

* changes

* changes

* fixes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes
2023-06-07 18:35:31 -07:00
Abubakar Abid
1c8cb5ebf1
v3.33.1 + Guide on setting up Gradio behind nginx... (#4379)
* nginx guide

* delete 3.33.0

* version

* unindent
2023-06-01 20:23:39 -07:00
Freddy Boulton
4ee9c1b708
Make chatbot input fields non-interactive while bot is streaming (#4363)
* Add demo impl

* trigger then if generating

* remove unused value

* CHANGELOG

* Fix code

* Update guide

* Update guides/07_other-tutorials/creating-a-chatbot.md

Co-authored-by: pngwn <hello@pngwn.io>

---------

Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-31 12:58:22 -07:00
aliabid94
114f4b4296
Push to spaces (#4033)
* changes

* first commit

* Update gradio/upload.py

Co-authored-by: Aarni Koskela <akx@iki.fi>

* Update gradio/upload.py

Co-authored-by: Aarni Koskela <akx@iki.fi>

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* chnages

* changes

* changes

* changes

* changes

* Update 03_sharing-your-app.md

* changes

* changes

* change

* changes

* changes

* changes

* Update gradio/deploy_space.py

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* changes

* changes

* changes

---------

Co-authored-by: Aarni Koskela <akx@iki.fi>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-31 10:13:46 +09:00
Aarni Koskela
7781665014
Don't allow dotfiles for /file= route (#4303)
* Don't allow dotfiles or files in "dot directories" for /file=

* update guide

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-30 15:19:42 -07:00
Micky Brunetti
0fc0e468cc
Programmatically launch reload to allow factories and arguments to be passed to the app (#4119)
* Programmatically lauch reload to allow factories and arguments to be passed to the app

* add warning

* modify warning

* guide fixes

* formatting

* changes

* warning

* import fix

* fix tests

* fix tests

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-15 13:56:10 -04:00
Der Chien
4e4549c063
Fix Explanation Regarding NumPy Image Component (#4204)
* 20230513 swap np height and width in docs

* changelog

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-15 08:13:35 -04:00
pngwn
83134c10eb
client docs tweaks (#4196)
* ci typo

* fix

* again

* again

* again

* ignore workbench

* small tweaks for publish + docs
2023-05-12 23:24:30 +01:00
pngwn
963c2d26ee
3712 js client (#3899) 2023-05-12 16:22:25 +01:00
Tom Aarsen
02bd90d7c1
[Docs] Resolve numerous typos (#4170)
* Resolve numerous typos

* Delete test.py

* Run generate_notebooks

* notebooks

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-11 15:20:41 -05:00
Abubakar Abid
bebfb72b35
Misc file and docs fixes (#4086)
* uvicorn version

* uvicorn version

* changes

* guides

* guide

* changelog

* typo

* typo

* Update guides/04_integrating-other-frameworks/01_using-hugging-face-integrations.md

* chinese lang

* rename

* Update guides/04_integrating-other-frameworks/01_using-hugging-face-integrations.md

* Update guides/03_building-with-blocks/04_custom-CSS-and-JS.md

Co-authored-by: aliabid94 <aabid94@gmail.com>

* address review

* simplify section

---------

Co-authored-by: aliabid94 <aabid94@gmail.com>
2023-05-07 08:48:24 -05:00
Abubakar Abid
ff21ecbc25
Add ability to blocklist filepaths, ability to specify where gradio temp files are created (#4047)
* temporary file

* tests

* formatting

* rename

* added another test

* guide

* formatting

* changelog

* added custom gradio temp directory (#4053)

* added custom gradio temp directory

* Update 03_sharing-your-app.md

* rename test

* address review

* remove print
2023-05-03 17:30:38 -05:00
Abubakar Abid
531f11d642
Fastapi Python Client Guide (#3892)
* fastapi guide

* changelog

* writing

* finish guide

* fix

* Update guides/06_client-libraries/fastapi-app-with-the-gradio-client.md

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* Update guides/06_client-libraries/fastapi-app-with-the-gradio-client.md

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* Update guides/06_client-libraries/fastapi-app-with-the-gradio-client.md

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* Update guides/06_client-libraries/fastapi-app-with-the-gradio-client.md

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* dependencies

* html

---------

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2023-05-02 15:54:40 -05:00
aliabid94
2f8b9f8b03
UI fixes for themes (#3590)
* changes

* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-28 14:31:41 -04:00
Ikko Eltociear Ashimine
4c0410579b
Fix typo in 07_other-tutorials/theming-guide.md (#3952)
* Fix typo in 07_other-tutorials/theming-guide.md

* Update CHANGELOG.md

---------

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2023-04-24 10:01:20 -04:00
Freddy Boulton
288e6f77cf
move guide to client section (#3948) 2023-04-24 09:51:46 -04:00
Freddy Boulton
ad2ed23ce0
Gradio and LLM agents guide (#3934)
* Add WIP guide

* Fix syntax

* Fix guide

* Fix guide
2023-04-21 17:05:58 -04:00
Simon Duerr
6e7abf8645
make use of gr. consistent (#3901)
* make use of gr. consistent

* add changelog

* Update CHANGELOG.md

* fix digit_classifier notebook

* lint

---------

Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2023-04-19 15:55:37 -04:00
Abubakar Abid
7a04ebe7fd
Fix some documentation-related issues in Guides (#3903)
* client doc fixes

* simplify demo

* added guides

* chatbot guide

* notebooks

* format
2023-04-19 14:38:11 -04:00
Abubakar Abid
9f4f851d68
Python client Guide (#3788)
* guide

* guide

* Apply suggestions from code review

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* add cancel

* remove duplicated docs

* updates

---------

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2023-04-12 13:44:38 -07:00
aliabid94
09aedce77c
Theme builder (#3664)
* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* Update CHANGELOG.md

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Update gradio/themes/builder.py

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-30 11:20:34 -07:00
Ali Abdalla
1229f3b001
Fix outdated sharing your app guide (#3699)
* fix embed this space screenshot

* fix use via api

* changelog

---------

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2023-03-29 19:49:40 -04:00
pngwn
ae4277a9a8
move files (#3605)
* move files

* commit the rest of the files

* fix lockfile

* fix workflow

* fix type errors

* fix tests

* only run ci when certain files change

* run correct test command in ci

* version

* fix pypi script

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-27 16:12:58 -07:00
Freddy Boulton
108a66bbd1
Fix embedded demos (#3638)
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-27 08:33:57 -07:00
Ali Abdalla
053504a691
Remove extra $demo from theme guide (#3563)
* remove extra

* changelog
2023-03-21 12:53:47 -07:00
Ali Abdalla
ab95f0551e
Mobile responsive iframes in themes guide (#3562)
* make demos mobile responsive

* changelog
2023-03-21 11:52:34 -07:00
Abubakar Abid
6c8aeed58f
Theme guide fixes (#3561)
* fixes

* changelog

* changelog

* changelog

* fix
2023-03-21 10:44:25 -07:00
Abubakar Abid
dbd4f755fe
Fixes theme guide & releases gradio==3.23.0 (#3554)
* some updates to the guide theme

* version release

* changelog

* changelog

* update guides to use interface

* changes

---------

Co-authored-by: Ali Abid <aabid94@gmail.com>
2023-03-20 23:20:09 -07:00