ariG23498 HF staff commited on
Commit
4e1d5f7
·
1 Parent(s): f03fa61

change format

Browse files
Files changed (2) hide show
  1. app.py +12 -11
  2. description.py +8 -0
app.py CHANGED
@@ -3,6 +3,7 @@ import numpy as np
3
  import requests
4
 
5
  import gradio as gr
 
6
 
7
  def request_and_response(url):
8
  response = requests.get(url)
@@ -57,20 +58,20 @@ def get_closest_paper(query):
57
 
58
 
59
  with gr.Blocks() as iface:
60
- gr.Markdown("""\
61
- # Query AK's Daily Paper Collection
62
- Query papers you want to read from AK's daily paper collection. Ask what you want to read,
63
- and we will provide you with the paper id that serves your query the best. It is a work in progress (please be kind)\
64
-
65
- Thanks to Tom Arsen for reviewing the code and working alongside.""")
66
- query = gr.Textbox(placeholder="What do you have in mind?")
67
  with gr.Row():
68
- title = gr.Textbox()
69
- paper_link = gr.Textbox()
70
- abstract = gr.Textbox()
71
- btn = gr.Button(value="Submit")
 
 
 
 
 
72
  btn.click(get_closest_paper, query, [title, paper_link, abstract])
73
 
74
 
 
75
  if __name__ == "__main__":
76
  iface.launch()
 
3
  import requests
4
 
5
  import gradio as gr
6
+ from description import project_description
7
 
8
  def request_and_response(url):
9
  response = requests.get(url)
 
58
 
59
 
60
  with gr.Blocks() as iface:
61
+ gr.Markdown(project_description)
 
 
 
 
 
 
62
  with gr.Row():
63
+ with gr.Colum():
64
+ query = gr.Textbox(placeholder="What do you have in mind?")
65
+ btn = gr.Button(value="Submit")
66
+ with gr.Colum():
67
+ with gr.Row():
68
+ title = gr.Textbox()
69
+ paper_link = gr.Textbox()
70
+ abstract = gr.Textbox()
71
+
72
  btn.click(get_closest_paper, query, [title, paper_link, abstract])
73
 
74
 
75
+
76
  if __name__ == "__main__":
77
  iface.launch()
description.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ project_description = """\
2
+ # Query AK's Daily Paper Collection
3
+
4
+ Query papers you want to read from AK's daily paper collection. Ask what you want to read,
5
+ and we will provide you with the paper id that serves your query the best. It is a work in progress (please be kind)
6
+
7
+ Thanks to [Tom Arsen](https://huggingface.co/tomaarsen) for reviewing the code and working alongside.
8
+ """