Commit Graph

4222 Commits

Author SHA1 Message Date
Simon Mo
ddd7fa13dc
Lower bound Python version to 3.7 (#1480)
* Lower bound Python version to 3.7

* Update doc
2022-06-07 12:00:29 -07:00
pngwn
cc6aeb6d72
distribute gradio as a web component (#1444)
* distribute gradio as a web component

* fix layout + loader + dark mode in embedded wc

* fix lockfile issue

* formatting

* prevent loader conflicts

* fix formatting
2022-06-07 11:11:44 -07:00
Abubakar Abid
6dfb00b06e
readme code cleanup (#1467)
* readme cleanup

* fixes
2022-06-07 10:47:34 -07:00
Bharat Raghunathan
22c87d4b59
Fix broken links in "Next Steps" of README.md (#1466)
* Update README.md

* add comment to readme

* fixed links

* made changes to readme template

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-06-06 16:14:16 -07:00
Ali Abdalla
42cee33dcf
API Docs with support for Blocks (#1397)
* backend

* updated PyPi version to 3.0.10

* updated PyPi version to 3.0.9b10

* fixes

* updated PyPi version to 3.0.9b11

* changes

* changes

* changes git push

* changes

* undo

* fixes

Co-authored-by: Ali Abid <aabid94@gmail.com>
2022-06-06 09:10:42 -07:00
Chih-Yu Yeh
f6414d3c33
fix issue#1353 (#1457)
* fix issue#1353

* change logic

* changes

Co-authored-by: Ali Abid <aabid94@gmail.com>
2022-06-06 07:58:19 -07:00
Abubakar Abid
d8eb957534
bring in local namespace for jupyter magic (#1461)
* bring in local namespace

* formatting
2022-06-06 12:11:45 +03:00
Edoardo Abati
db36d6880e
Changed share argument default in .launch method (#1449)
* changed default of share argument

* make share=False raise an Exception when localhost not reachable

* using self.share across the launch method

* reverted docstring to previous sentence

* added getter and setter for self.share

* added tests for setting Blocks.share

* fixed test

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-06-03 11:59:50 -07:00
Ömer Faruk Özdemir
267ba1e45b
Max parallel threads (#1460)
* Set max parallel threads to 100.

I could not find a better solution than monkey-patching
`anyio.to_thread.run_sync` to use a custom `CapacityLimiter`. I did try
to obtain the predictions inside a context handler instead:

```
async with self.limiter:
    predictions = await run_in_threadpool(block_fn.fn, *processed_input)
```

However, that approach didn't seem to work.

* Make max parallel threads configurable.

`max_threads` can now be used in `launch` to specify the desired number
of parallel threads supported.

* Fix import order.

* Update gradio/blocks.py

* Replace `run_in_threadpool` with `run_sync`.

We create the capacity limiter on launch, and invoke
`anyio.to_thread.run_sync` directly instead of going through
`run_in_threadpool`. This allows for some code simplification: we no
longer need to patch `anyio.to_thread.run_sync`.

* max_parallel_threads

- resolve conflicts

* max_parallel_threads

- solve error

* max_parallel_threads

- solve async error

Co-authored-by: Pedro Cuenca <pedro@latenitesoft.com>
2022-06-03 14:20:41 +03:00
Abubakar Abid
282748b4af
updated PyPi version to 3.0.11 (#1458) 2022-06-03 00:13:16 -07:00
Abubakar Abid
71bcfdbe92
Callable blocks (#1437)
* format backend

* blocks callable

* call blocks

* format

* fixed upload

* fix mix

* formatting

* formatting

* formatting

* added serialization/deserialization for video

* formatting

* blocks

* formatting

* fix tests

* formatting
2022-06-02 15:37:25 -07:00
Martina Fumanelli
74ccf3e957
Fix/combine adjacent (#1426)
* Fix combine_adjacent arg of HighlightedText

* Delete multilingual_named_entity_recognition_using_mbert.md

* Fix file components.py style

* Fix style gradio/components.py

* Add adjacent_separator parameter to HighlightedText class

Co-authored-by: martina.fumanelli <martina.fumanelli@MBP-di-martinafumanelli.local>
Co-authored-by: martina.fumanelli <martina.fumanelli@MBPdimaumanelli.homenet.telecomitalia.it>
2022-06-02 10:44:58 -07:00
aliabid94
188d8bc65d
Allow async js fn (#1439)
* updated PyPi version to 3.0.10

* updated PyPi version to 3.0.9b10

* fixes

* updated PyPi version to 3.0.9b11

* fix update sript

* changes
2022-06-01 11:34:07 -07:00
pngwn
279df2322d
fix button styling (#1447) 2022-06-01 11:33:53 -07:00
pngwn
068132836c
Style updates (#1350)
* clean up python style api

* allow Box to be styled

* changes

* update style args and add md doc detailing

* cleanup

* add deprecation warnings

* fix

* formatting
2022-06-01 18:02:18 +01:00
Dawood Khan
7b9cba0e9e
File Cached Examples Fix (#1334)
* fix file cache examples issue

* format

* fix for tests

* format fix

* fix multiple files input

* format

* format

* fix preprocess example

* fix multiple file output

* remove single_file const

* fix tests + format

* renamed demo

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-06-01 12:23:12 -04:00
Abubakar Abid
576bd227fc
Fixes gr.Interface.load() (#1436)
* format backend

* changes

Co-authored-by: Ali Abid <aabid94@gmail.com>
2022-06-01 08:35:33 +03:00
Radamés Ajna
7e796a3e17
set iframe policy to enable camera and audio (#1433) 2022-05-31 14:53:28 -07:00
Evelyn Coronel
4a944e6f9f
#1398 PR fix (#1407) 2022-05-31 14:24:14 -07:00
Radamés Ajna
6a6cea795f
set camera icon always stroke white (#1434) 2022-05-31 14:10:07 -07:00
aliabid94
c96075a7b7
Broken examples hotfix (#1414)
* fix

* changes

* changes

* changes

* changes

* changes
2022-05-31 11:26:54 -07:00
Ömer Faruk Özdemir
08692bf08c
fix broken link in getting_started (#1428) 2022-05-31 15:36:24 +03:00
Ömer Faruk Özdemir
8d10c5ab45
Update bug_report_template.yml (#1425) 2022-05-31 11:25:53 +03:00
Ömer Faruk Özdemir
55ddc3c3aa
Update bug_report_template.yml (#1424) 2022-05-31 11:23:13 +03:00
Ömer Faruk Özdemir
5eebaad334
Update bug_report_template.yml (#1423) 2022-05-31 11:16:46 +03:00
pngwn
7b4ad81d59
update plot ui (#1405) 2022-05-30 15:21:36 +01:00
aliabid94
acb3024c3e
fix (#1415) 2022-05-28 22:03:43 -07:00
aliabid94
a8515c533f
Broken examples hotfix (#1413)
* fix

* changes

* changes

* changes

* changes

* changes
2022-05-28 22:02:05 -07:00
aliabid94
988f42c4b2
Broken examples hotfix (#1412)
* fix

* changes

* changes

* changes

* changes
2022-05-28 22:01:13 -07:00
aliabid94
40ed4df9ad
fix examples [hotfix] (#1411)
* fix

* changes

* changes
2022-05-28 21:56:05 -07:00
Abubakar Abid
22e551392f
Reload fix (#1392)
* updated PyPi version to 3.0.6

* updated PyPi version to 3.0.6b1

* updated reload.py

* updated PyPi version to 3.0.6b2

* fixed abs path issue

* updated PyPi version to 3.0.6b3

* formatting

* testing

* testing

* reload-fix

- tweaks

* reload-fix

- refornat

* reload-fix
- tweaks on comments

Co-authored-by: Ömer Faruk Özdemir <farukozderim@gmail.com>
2022-05-28 21:18:23 -07:00
Satpal Singh Rathore
3a10ed894b
Change output to chatbot (#1401) 2022-05-27 11:28:19 -07:00
Dawood Khan
2eaf61cf76
Integration tests (#1182)
* some integration tests

* more integration tests

* more tests

* update integration tests

* format
2022-05-27 04:53:50 -04:00
Ömer Faruk Özdemir
d117ad0049
remove-sizewatcher (#1400) 2022-05-27 11:06:23 +03:00
pngwn
55db5c187a
add cdn entrypoint (#1387)
* add cdn entrypoint

* cleanup
2022-05-27 02:17:13 +01:00
Abubakar Abid
d4a8077341
updated PyPi version to 3.0.6 (#1391) 2022-05-26 15:03:33 -07:00
aliabid94
d35e06abe7
Minor cosmetic changes (#1383)
* changes

* pass tests

* change to source sans

* formatting

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-05-26 14:33:28 -07:00
aliabid94
0a8222719e
fix default variable value (#1381)
* fix default variable value

* format
2022-05-26 14:22:05 -07:00
Abubakar Abid
cb2713e705
Getting Interface.load() working for 2.x and 3.x models and Spaces (#1361)
* version

* refactor for model and 2.x spaces

* fixing tests

* fixed tests

* getting there...

* formatting

* formatting

* fixes

* formatting

* external dependencies working

* formatting

* loading from 3.x

* changes

* wow finally it's working

* fixed formatting

* better error for spaces

* better error for spaces

* fixed 3.x bug

* formatting
2022-05-26 14:21:51 -07:00
Ömer Faruk Özdemir
97c85026e4
fix-sizewatcher (#1385) 2022-05-26 08:54:43 +03:00
Ömer Faruk Özdemir
f3f6171392
Update CONTRIBUTING.md (#1378) 2022-05-25 20:46:28 +03:00
Ömer Faruk Özdemir
c03241591e
update-sizewatcher (#1377) 2022-05-25 11:54:51 +03:00
Ömer Faruk Özdemir
499f6013ad
check-for-big-diff (#1375) 2022-05-25 10:28:27 +03:00
Ömer Faruk Özdemir
fc054a16ab
reload-dev-mode (#1370)
* reload-dev-mode

- add dev reload mode

* reload-dev-mode

- support reload mode from different directories as well

* reload-dev-mode

- add file reload to the dev-reload-mode

* Update contributing

* Update CONTRIBUTING.md

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

* reload-dev-mode

- fetch gradio_folder with inspect, allowing running in reload dev mode from any directory
- unite user and dev reload mode

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-05-25 10:12:24 +03:00
aliabid94
3a7f9a3b1a
Allow users to return dicts for values (#1373)
* changes

* changes

* add visible flag
2022-05-24 23:30:24 -07:00
Victor Muštar
0ab254b82f
Mute examples videos (#1363)
* mute examples videos

* set attrs onmount for safari

Co-authored-by: Radames Ajna <radamajna@gmail.com>
2022-05-24 13:08:08 -07:00
Ömer Faruk Özdemir
e4b5d4c1b7
Reload mode on (#1278)
* reload-mode

-trys save

* reload-mode

- create minimal reloading example

* reload-mode

- create minimal reloading examples

* reload-mode

- amend

* reload-mode

- add user_mode

* reload-mode

- tweaks

* updated PyPi version to 3.0.3

* reloading

* reload

* formatting

* flexibility in naming

* added dev_mode flag to config

* added app id

* frontend changes

* changed debug level to warning to make less verbose

* Update ui/packages/app/src/main.ts

* fixed tests

* formatting

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Ali Abid <aabid94@gmail.com>
2022-05-23 14:38:53 -07:00
Abubakar Abid
7248f1359b
Hotfixes for plot (#1355)
* fixed plot and added tests

* 3.0.4

* formatting

* fixed tests
2022-05-22 13:54:04 -07:00
Abubakar Abid
d34d3181b4
updated PyPi version to 3.0.3 (#1351) 2022-05-20 18:06:52 -07:00
Abubakar Abid
74703898c6
Model3d fix (#1342)
* fixing postprocessing

* fixed value

* formatting

* fixes

* model3d

* typing

* formatting

* formatting

* components

* fixed defaults

* fixed tests

* formatting

* removed unused import typing error

* fixed up model3d tests

* model3d

* formatting

* fix default value interactive bug

Co-authored-by: Dawood <dawoodkhan82@gmail.com>
2022-05-20 17:53:27 -07:00