Peijie commited on
Commit
d0d0416
·
1 Parent(s): 0d1bfaa

add a dataframe.

Browse files
Files changed (3) hide show
  1. .gitignore +2 -1
  2. app.py +5 -3
  3. rl_agent/__init__.py +0 -0
.gitignore CHANGED
@@ -1 +1,2 @@
1
- *.pyc
 
 
1
+ *.pyc
2
+ .vscode
app.py CHANGED
@@ -3,9 +3,9 @@ import pandas as pd
3
  import plotly.graph_objects as go
4
  from plotly.subplots import make_subplots
5
 
6
- from env import Environment
7
- from policy import Policy
8
- from utils import myOptimizer
9
 
10
  import torch
11
  from collections import OrderedDict
@@ -151,6 +151,8 @@ with gr.Blocks() as demo:
151
  hold_btn = gr.components.Button("Hold", label="Hold", interactive=True, inputs=[amount])
152
  with gr.Column():
153
  gr.Markdown("Trade bot history.")
 
 
154
  # show trade box history in a table or something
155
  gr.components.Textbox(value="Some history? Need to decide how to show bot history", label="History", interactive=True)
156
 
 
3
  import plotly.graph_objects as go
4
  from plotly.subplots import make_subplots
5
 
6
+ from rl_agent.env import Environment
7
+ from rl_agent.policy import Policy
8
+ from rl_agent.utils import myOptimizer
9
 
10
  import torch
11
  from collections import OrderedDict
 
151
  hold_btn = gr.components.Button("Hold", label="Hold", interactive=True, inputs=[amount])
152
  with gr.Column():
153
  gr.Markdown("Trade bot history.")
154
+ df_data_train = pd.DataFrame(columns=["Action", "Amount", "Profit"])
155
+ trade_bot_table = gr.Dataframe(df_data_train)
156
  # show trade box history in a table or something
157
  gr.components.Textbox(value="Some history? Need to decide how to show bot history", label="History", interactive=True)
158
 
rl_agent/__init__.py ADDED
File without changes