jiangjiechen commited on
Commit
a9a78de
1 Parent(s): 8213d90

update layout

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -12,9 +12,9 @@ import gradio as gr
12
  from huggingface_hub import snapshot_download
13
  from prettytable import PrettyTable
14
  import pandas as pd
 
15
 
16
  config = {
17
- "input": "demo",
18
  "model_type": "roberta",
19
  "model_name_or_path": "roberta-large",
20
  "logic_lambda": 0.5,
@@ -24,7 +24,9 @@ config = {
24
  "max_seq1_length": 256,
25
  "max_seq2_length": 128,
26
  "max_num_questions": 8,
27
- "do_lower_case": False
 
 
28
  }
29
 
30
  os.system('git clone https://github.com/jiangjiechen/LOREN/')
@@ -80,7 +82,9 @@ def gradio_formatter(js, output_type):
80
  pt.add_row(v)
81
 
82
  html = pt.get_html_string(attributes={
83
- 'style': 'border: 1; border-width: 1px; border-collapse: collapse; align: left',
 
 
84
  }, format=True)
85
  return html
86
 
 
12
  from huggingface_hub import snapshot_download
13
  from prettytable import PrettyTable
14
  import pandas as pd
15
+ import torch
16
 
17
  config = {
 
18
  "model_type": "roberta",
19
  "model_name_or_path": "roberta-large",
20
  "logic_lambda": 0.5,
 
24
  "max_seq1_length": 256,
25
  "max_seq2_length": 128,
26
  "max_num_questions": 8,
27
+ "do_lower_case": False,
28
+ "seed": 42,
29
+ "n_gpu": torch.cuda.device_count(),
30
  }
31
 
32
  os.system('git clone https://github.com/jiangjiechen/LOREN/')
 
82
  pt.add_row(v)
83
 
84
  html = pt.get_html_string(attributes={
85
+ 'style': 'border-width: 1px; border-collapse: collapse',
86
+ 'align': 'left',
87
+ 'border': '1'
88
  }, format=True)
89
  return html
90