AIRider commited on
Commit
a8319ba
·
verified ·
1 Parent(s): 0075b4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -10
app.py CHANGED
@@ -57,14 +57,12 @@ with gr.Interface(
57
  description="검색 쿼리를 입력하여 네이버 검색 결과에서 제목과 링크를 크롤링합니다"
58
  ) as demo:
59
  button = gr.Button("블로그 제목 가져오기")
60
- demo.launch()
 
61
 
62
- with gr.Interface(
63
- fn=get_blog_content,
64
- inputs=gr.Textbox(label="링크를 입력하세요"),
65
- outputs=gr.Textbox(label="블로그 제목"),
66
- title="블로그 제목 가져오기",
67
- description="링크를 입력하여 블로그 제목을 가져옵니다"
68
- ) as blog_content_interface:
69
- button.click(fn=get_blog_content, inputs="링크를 입력하세요", outputs="블로그 제목")
70
- blog_content_interface.launch()
 
57
  description="검색 쿼리를 입력하여 네이버 검색 결과에서 제목과 링크를 크롤링합니다"
58
  ) as demo:
59
  button = gr.Button("블로그 제목 가져오기")
60
+ text_input = gr.Textbox(label="링크를 입력하세요")
61
+ text_output = gr.Textbox(label="블로그 제목")
62
 
63
+ def get_blog_content_wrapper(link):
64
+ return get_blog_content(link)
65
+
66
+ button.click(fn=get_blog_content_wrapper, inputs=text_input, outputs=text_output)
67
+
68
+ demo.launch()