lalital commited on
Commit
9b31ff6
1 Parent(s): 5bb2fa6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -15
app.py CHANGED
@@ -20,19 +20,6 @@ tokenizer = AutoTokenizer.from_pretrained(
20
 
21
  css_text = """<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">"""
22
 
23
- # def render_html(items: List[Dict]):
24
- # html_text = ''
25
- # for item in items:
26
-
27
- # label, score = item['label'], item['score']
28
- # label_id = LABEL_MAPPING_REVERSED[label]
29
-
30
- # progress_bar_class_text = CSS_PROGRESS_BAR_MAPPING[label_id]
31
-
32
- # html_text += f'<span>{label.replace(" ", "&nbsp;")}:&nbsp;&nbsp;{(score*100):8.2f}%<span>' + \
33
- # f'<div class="w3-light-grey w3-round"><div class="{progress_bar_class_text} w3-round" style="height:19px;width:{round(score*100,2)}%"></div></div><div style="height:8px;"></div>'
34
-
35
- # return '<div class="w3-container">' + html_text + '</div>'
36
 
37
  def summarize(input_text: str, num_beams=5) -> str:
38
 
@@ -54,8 +41,6 @@ def summarize(input_text: str, num_beams=5) -> str:
54
  return '<p>' + preditected_summary + '</p>'
55
 
56
 
57
-
58
-
59
  demo = gr.Interface(fn=summarize,
60
  inputs=gr.Textbox(lines=5, placeholder='Input text in Thai', label='Input text'),
61
  examples=[
 
20
 
21
  css_text = """<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">"""
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
  def summarize(input_text: str, num_beams=5) -> str:
25
 
 
41
  return '<p>' + preditected_summary + '</p>'
42
 
43
 
 
 
44
  demo = gr.Interface(fn=summarize,
45
  inputs=gr.Textbox(lines=5, placeholder='Input text in Thai', label='Input text'),
46
  examples=[