pngwn HF staff commited on
Commit
0409ba9
·
verified ·
1 Parent(s): a53c05c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ class Data:
7
  self.data = [[data]]
8
  def update(self):
9
  self.data.append([new_data])
10
- def get_data():
11
  return self.data
12
 
13
  app = FastAPI()
@@ -28,7 +28,7 @@ def greet(name):
28
  return f"Hello, {name}!"
29
 
30
  with gr.Blocks() as blocks:
31
- gr.Dataframe(value=lambda x: data_for_app.get_data(), label="My Data")
32
 
33
  # Mount Gradio app to root
34
  app = gr.mount_gradio_app(app, blocks, path="/")
 
7
  self.data = [[data]]
8
  def update(self):
9
  self.data.append([new_data])
10
+ def get_data(self):
11
  return self.data
12
 
13
  app = FastAPI()
 
28
  return f"Hello, {name}!"
29
 
30
  with gr.Blocks() as blocks:
31
+ gr.Dataframe(value=data_for_app.get_data, label="My Data")
32
 
33
  # Mount Gradio app to root
34
  app = gr.mount_gradio_app(app, blocks, path="/")