davidna22 commited on
Commit
d86bae2
1 Parent(s): 82d5065

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -62,7 +62,7 @@ def init_app(api_key,
62
  dtype=dtype,
63
  device="cuda")
64
  return {
65
- progress_box: "Model Initialized Successfully! Time to Run the Simulation",
66
  log_output: console_logs.getvalue(),
67
  main_block_step_1: gr.update(visible=False),
68
  main_block_step_2: gr.update(visible=True),
@@ -123,9 +123,8 @@ def run_simulation(topic,
123
  img_fullpath = os.path.join(os.path.dirname(__file__), img_filename)
124
  sys.stdout=restore_point
125
  return {
126
- progress_box: "Simulation finished. To see your results, visit the bot simulation Mastodon server.",
127
  log_output: console_logs.getvalue(),
128
- mastodon_link: gr.update(visible=True),
129
  simulation_output_box: gr.update(visible=True),
130
  saved_file: tweet_filename,
131
  example_image: img_fullpath
@@ -273,9 +272,10 @@ with gr.Blocks() as demo:
273
  with_images.change(toggle_image_params, with_images, [image_params])
274
 
275
  with gr.Row(elem_id="progress_box") as progress_box:
276
- progress_box = gr.Textbox(label="Current Progress", show_label=True)
277
- log_output = gr.Textbox(every=0.5, label="Logs", lines=8)
278
- mastodon_link = gr.Markdown("Link to Mastodon Server: [https://bot-simulation-research.app/home](https://bot-simulation-research.app/home)", visible=False)
 
279
 
280
  with gr.Row(elem_id="simulation_output_box", visible=False) as simulation_output_box:
281
  saved_file = gr.File(label="List of Generated Tweets (CSV)")
@@ -299,7 +299,6 @@ with gr.Blocks() as demo:
299
  ],
300
  outputs=[progress_box,
301
  log_output,
302
- mastodon_link,
303
  simulation_output_box,
304
  saved_file,
305
  example_image
 
62
  dtype=dtype,
63
  device="cuda")
64
  return {
65
+ progress_box: "### Current Progress \n Model Initialized Successfully! Time to Run the Simulation",
66
  log_output: console_logs.getvalue(),
67
  main_block_step_1: gr.update(visible=False),
68
  main_block_step_2: gr.update(visible=True),
 
123
  img_fullpath = os.path.join(os.path.dirname(__file__), img_filename)
124
  sys.stdout=restore_point
125
  return {
126
+ progress_box: "### Current Progress \n To see your results, visit the bot simulation Mastodon server. \n Link to Mastodon Server: [https://bot-simulation-research.app/home](https://bot-simulation-research.app/home)",
127
  log_output: console_logs.getvalue(),
 
128
  simulation_output_box: gr.update(visible=True),
129
  saved_file: tweet_filename,
130
  example_image: img_fullpath
 
272
  with_images.change(toggle_image_params, with_images, [image_params])
273
 
274
  with gr.Row(elem_id="progress_box") as progress_box:
275
+ with gr.Column():
276
+ progress_box = gr.Markdown("### Current Progress <br>")
277
+ with gr.Column():
278
+ log_output = gr.Textbox(every=0.5, label="Logs", lines=8)
279
 
280
  with gr.Row(elem_id="simulation_output_box", visible=False) as simulation_output_box:
281
  saved_file = gr.File(label="List of Generated Tweets (CSV)")
 
299
  ],
300
  outputs=[progress_box,
301
  log_output,
 
302
  simulation_output_box,
303
  saved_file,
304
  example_image