gabrielwithhappy commited on
Commit
936f80e
โ€ข
1 Parent(s): 1780316

fix merge conflict

Browse files
Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -17,14 +17,9 @@ def get_summary(input_text):
17
  summary_model = BartForConditionalGeneration.from_pretrained("ainize/kobart-news")
18
  input_ids = tokenizer.encode(input_text, return_tensors="pt")
19
  summary_text_ids = summary_model.generate(
20
- <<<<<<< HEAD
21
  input_ids=input_ids,
22
  length_penalty=2,
23
  top_p=0.9,
24
- =======
25
- length_penalty=1,
26
- # top_p=0.9,
27
- >>>>>>> d050d191bf6ac2aad382b3d7ee3b1fe6e6302502
28
  max_length=128,
29
  min_length=12,
30
  num_beams=2,
@@ -84,7 +79,7 @@ def update_news_data():
84
  global news_data
85
  news_data = news_collector().update_news_examples()
86
  print("๋‰ด์Šค ๋ฐ์ดํ„ฐ ์—…๋ฐ์ดํŠธ ์™„๋ฃŒ")
87
-
88
  update_news_data()
89
 
90
  title = "๊ท ํ˜•์žกํžŒ ๋‰ด์Šค ์ฝ๊ธฐ (Balanced News Reading)"
@@ -116,10 +111,10 @@ with gr.Blocks(theme='pseudolab/huggingface-korea-theme') as demo:
116
  # gr.load("models/Hyeonseo/ko-finance_news_classifier",
117
  inputs = Link_TXT)
118
  Link_URL = gr.Textbox(label="๋‰ด์Šค URL")
119
-
120
  update_button = gr.Button(value="๋‰ด์Šค ๋ฐ์ดํ„ฐ ์—…๋ฐ์ดํŠธ")
121
  update_button.click(fn=update_news_data, inputs=None, outputs=None)
122
-
123
  gr.Examples(
124
  news_data,
125
  [Link_TXT, Link_URL],
 
17
  summary_model = BartForConditionalGeneration.from_pretrained("ainize/kobart-news")
18
  input_ids = tokenizer.encode(input_text, return_tensors="pt")
19
  summary_text_ids = summary_model.generate(
 
20
  input_ids=input_ids,
21
  length_penalty=2,
22
  top_p=0.9,
 
 
 
 
23
  max_length=128,
24
  min_length=12,
25
  num_beams=2,
 
79
  global news_data
80
  news_data = news_collector().update_news_examples()
81
  print("๋‰ด์Šค ๋ฐ์ดํ„ฐ ์—…๋ฐ์ดํŠธ ์™„๋ฃŒ")
82
+
83
  update_news_data()
84
 
85
  title = "๊ท ํ˜•์žกํžŒ ๋‰ด์Šค ์ฝ๊ธฐ (Balanced News Reading)"
 
111
  # gr.load("models/Hyeonseo/ko-finance_news_classifier",
112
  inputs = Link_TXT)
113
  Link_URL = gr.Textbox(label="๋‰ด์Šค URL")
114
+
115
  update_button = gr.Button(value="๋‰ด์Šค ๋ฐ์ดํ„ฐ ์—…๋ฐ์ดํŠธ")
116
  update_button.click(fn=update_news_data, inputs=None, outputs=None)
117
+
118
  gr.Examples(
119
  news_data,
120
  [Link_TXT, Link_URL],