Repository: gradio-app/gradio

Issue:
Button.click gets an empty file input
### Describe the bug

If I use a `gr.File` object as an input of `Button.click()`, the corresponding event handler function will get an empty file.

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Reproduction

```python
import gradio as gr

with gr.Blocks() as demo:
    file = gr.File()
    upload = gr.Button('Upload')
    data = gr.Textbox(label='Data')
    upload.click(lambda f: f.read(), inputs=[file], outputs=[data])

demo.launch()
```

### Screenshot

<img width="765" alt="image" src="https://user-images.githubusercontent.com/5109942/228165303-d90475df-c333-4d89-9950-9f50679e2234.png">


### Logs

```shell
No helpful logs.
```


### System Info

```shell
gradio==v3.23.1b2
Mac
```


### Severity

blocking upgrade to latest gradio version


Discussion:

Resolving patch:
diff --git a/demo/fake_gan/run.py b/demo/fake_gan/run.py
--- a/demo/fake_gan/run.py
+++ b/demo/fake_gan/run.py
@@ -36,7 +36,7 @@ def fake_gan():
 
         gallery = gr.Gallery(
             label="Generated images", show_label=False, elem_id="gallery"
-        ).style(grid=[2], height="auto")
+        ).style(columns=[2], rows=[2], object_fit="contain", height="auto")
 
     btn.click(fake_gan, None, gallery)
 
diff --git a/gradio/components.py b/gradio/components.py
--- a/gradio/components.py
+++ b/gradio/components.py
@@ -4060,25 +4060,39 @@ def style(
         self,
         *,
         grid: int | Tuple | None = None,
+        columns: int | Tuple | None = None,
+        rows: int | Tuple | None = None,
         height: str | None = None,
         container: bool | None = None,
         preview: bool | None = None,
+        object_fit: str | None = None,
         **kwargs,
     ):
         """
         This method can be used to change the appearance of the gallery component.
         Parameters:
-            grid: Represents the number of images that should be shown in one row, for each of the six standard screen sizes (<576px, <768px, <992px, <1200px, <1400px, >1400px). if fewer that 6 are given then the last will be used for all subsequent breakpoints
+            grid: ('grid' has been renamed to 'columns') Represents the number of images that should be shown in one row, for each of the six standard screen sizes (<576px, <768px, <992px, <1200px, <1400px, >1400px). if fewer that 6 are given then the last will be used for all subsequent breakpoints            columns: Represents the number of columns in the image grid, for each of the six standard screen sizes (<576px, <768px, <992px, <1200px, <1400px, >1400px). if fewer that 6 are given then the last will be used for all subsequent breakpoints
+            rows: Represents the number of rows in the image grid, for each of the six standard screen sizes (<576px, <768px, <992px, <1200px, <1400px, >1400px). if fewer that 6 are given then the last will be used for all subsequent breakpoints
             height: Height of the gallery.
             container: If True, will place gallery in a container - providing some extra padding around the border.
             preview: If True, will display the Gallery in preview mode, which shows all of the images as thumbnails and allows the user to click on them to view them in full size.
+            object_fit: CSS object-fit property for the thumbnail images in the gallery. Can be "contain", "cover", "fill", "none", or "scale-down".
         """
         if grid is not None:
-            self._style["grid"] = grid
+            warnings.warn(
+                "The 'grid' parameter will be deprecated. Please use 'columns' instead.",
+            )
+            self._style["grid_cols"] = grid
+        if columns is not None:
+            self._style["grid_cols"] = columns
+        if rows is not None:
+            self._style["grid_rows"] = rows
         if height is not None:
             self._style["height"] = height
         if preview is not None:
             self._style["preview"] = preview
+        if object_fit is not None:
+            self._style["object_fit"] = object_fit
 
         Component.style(self, container=container, **kwargs)
         return self


Test patch: