gradio/client/python/gradio_client/data_classes.py
Greysuki 54af6ae290
Adding subtitles to gr.Video (#3673)
* v2 version now accepts video and subtitle format inputs.

* remove debug log and some format issue

* Update CHANGELOG.md

* Upload components.py and regenerate demo

* fix components and add comment to function

* fix postprocess return format

* changelog

* demo change to gr.Interface type

* fix file_types

* fixes

* added video serializer

* clean up preprocess

* clean up postprocess

* formatting

* frontend

* fixed serialization

* dataclass

* fix serialize

* version

* fix tests

* version

* changelog

* typing

* version

* changelog

* version

* versin

* fix tests

* fix tests

* backend

* test

* changes

* relax test

* fix demo

* notebook

* changes

* fix

* changes

* Update gradio/components.py

* Update client/python/gradio_client/client.py

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Ali Abid <aabid94@gmail.com>
2023-04-11 16:06:48 -07:00

14 lines
409 B
Python

from __future__ import annotations
from typing_extensions import NotRequired, TypedDict
class FileData(TypedDict):
name: str | None # filename
data: str | None # base64 encoded data
size: NotRequired[int | None] # size in bytes
is_file: NotRequired[
bool
] # whether the data corresponds to a file or base64 encoded data
orig_name: NotRequired[str] # original filename