hzhwcmhf commited on
Commit
fa6fb41
·
1 Parent(s): 552c70e
Files changed (1) hide show
  1. app.py +11 -7
app.py CHANGED
@@ -34,16 +34,16 @@ notice_markdown = ("""
34
 
35
  ## Resources
36
 
37
- - [[Github]](https://github.com/thu-coai/DA-Transformer)
38
  - Papers: [[Machine Translation]](https://proceedings.mlr.press/v162/huang22m/huang22m.pdf) [[Pre-training]](https://arxiv.org/pdf/2304.11791.pdf)
39
 
40
  ## Terms of use
41
  By using this service, users are required to agree to the following terms: The service is a research preview intended for non-commercial use only. It does not gaurantee the correctness of the output text. The service may collect user data for future research.
42
 
43
  ## This demo contains models
44
- - [En-De Translation]()
45
- - [Zh-En Translation]()
46
- - [Question Generation]()
47
  """)
48
 
49
  learn_more_markdown = ("""
@@ -512,16 +512,18 @@ def build_tab_detail():
512
  return load
513
 
514
  def build_demo():
 
515
  with gr.Blocks(title="DA-Transformer Demo", theme=gr.themes.Base(), css=css) as demo:
516
  gr.Markdown(notice_markdown)
517
 
518
- with gr.Tab("Speed Comparison") as compare_tab:
519
- compare_load = build_tab_compare()
520
- compare_load(compare_tab.select)
521
  with gr.Tab("DA-Transformer Inspection") as detail_tab:
522
  detail_load = build_tab_detail()
523
  detail_load(detail_tab.select)
524
 
 
 
 
 
525
  gr.Markdown(learn_more_markdown)
526
 
527
  compare_load(demo.load)
@@ -540,6 +542,8 @@ if __name__ == "__main__":
540
 
541
  workers = concurrent.futures.ThreadPoolExecutor(max_workers=1)
542
  demo = build_demo()
 
 
543
  demo.queue(concurrency_count=args.concurrency_count, status_update_rate=10,
544
  api_open=False).launch(server_name=args.host, server_port=args.port,
545
  share=args.share, max_threads=5)
 
34
 
35
  ## Resources
36
 
37
+ - Codes: [[Github]](https://github.com/thu-coai/DA-Transformer)
38
  - Papers: [[Machine Translation]](https://proceedings.mlr.press/v162/huang22m/huang22m.pdf) [[Pre-training]](https://arxiv.org/pdf/2304.11791.pdf)
39
 
40
  ## Terms of use
41
  By using this service, users are required to agree to the following terms: The service is a research preview intended for non-commercial use only. It does not gaurantee the correctness of the output text. The service may collect user data for future research.
42
 
43
  ## This demo contains models
44
+ - [Zh-En Translation](https://huggingface.co/thu-coai/dat_base_translation_zhen)
45
+ - [En-De Translation](https://huggingface.co/thu-coai/dat_base_translation_ende)
46
+ - [Question Generation](https://huggingface.co/thu-coai/dat_uncased_squad)
47
  """)
48
 
49
  learn_more_markdown = ("""
 
512
  return load
513
 
514
  def build_demo():
515
+ logger.info(f"build enter")
516
  with gr.Blocks(title="DA-Transformer Demo", theme=gr.themes.Base(), css=css) as demo:
517
  gr.Markdown(notice_markdown)
518
 
 
 
 
519
  with gr.Tab("DA-Transformer Inspection") as detail_tab:
520
  detail_load = build_tab_detail()
521
  detail_load(detail_tab.select)
522
 
523
+ with gr.Tab("Speed Comparison") as compare_tab:
524
+ compare_load = build_tab_compare()
525
+ compare_load(compare_tab.select)
526
+
527
  gr.Markdown(learn_more_markdown)
528
 
529
  compare_load(demo.load)
 
542
 
543
  workers = concurrent.futures.ThreadPoolExecutor(max_workers=1)
544
  demo = build_demo()
545
+ logger.info(f"build over")
546
+
547
  demo.queue(concurrency_count=args.concurrency_count, status_update_rate=10,
548
  api_open=False).launch(server_name=args.host, server_port=args.port,
549
  share=args.share, max_threads=5)