ssocean commited on
Commit
d1b5a51
·
verified ·
1 Parent(s): fb9334a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -109,13 +109,12 @@ def update_button_status(title, abstract):
109
  return gr.update(value="Error: " + message), gr.update(interactive=False)
110
  return gr.update(value=message), gr.update(interactive=True)
111
 
112
- # 创建 Gradio 界面
113
  with gr.Blocks() as iface:
114
  gr.Markdown("""
115
  # 🧠 Predict Academic Impact of Newly Published Paper!
116
  ### Estimate the future academic impact of a paper using LLM
117
- [Read the full paper](https://arxiv.org/abs/2408.03934)
118
- Please note that due to the characteristics of ZeroGPU, quantized models cannot be preloaded. Each time you click "Predict," the model will need to be reinitialized, which may take additional time (usually less than 20s).
119
  """)
120
  with gr.Row():
121
  with gr.Column():
@@ -133,6 +132,14 @@ with gr.Blocks() as iface:
133
  submit_button = gr.Button("Predict Impact", interactive=False)
134
  with gr.Column():
135
  output = gr.Label(label="Predicted Impact")
 
 
 
 
 
 
 
 
136
 
137
  # 输入事件绑定
138
  title_input.change(
@@ -156,14 +163,7 @@ with gr.Blocks() as iface:
156
  examples=examples,
157
  inputs=[title_input, abstract_input],
158
  outputs=[validation_status, output],
159
- cache_examples=False
160
  )
161
- gr.Markdown("""
162
- **Important Notes**
163
- - It is intended as a tool for research and educational purposes only.
164
- - Predicted impact is a probabilistic value generated by the model and does not reflect paper quality or novelty.
165
- - The author takes no responsibility for the prediction results.
166
- - To identify potentially impactful papers, this study uses the sigmoid+MSE approach to optimize NDCG values (over sigmoid+BCE), resulting in predicted values concentrated between 0.1 and 0.9 due to the sigmoid gradient effect.
167
- - Generally, it is considered a predicted influence score greater than 0.65 to indicate an impactful paper.
168
- """)
169
  iface.launch()
 
109
  return gr.update(value="Error: " + message), gr.update(interactive=False)
110
  return gr.update(value=message), gr.update(interactive=True)
111
 
 
112
  with gr.Blocks() as iface:
113
  gr.Markdown("""
114
  # 🧠 Predict Academic Impact of Newly Published Paper!
115
  ### Estimate the future academic impact of a paper using LLM
116
+ ###### [Read the full paper](https://arxiv.org/abs/2408.03934)
117
+ ###### Please note that due to the characteristics of ZeroGPU, quantized models cannot be preloaded. Each time you click "Predict", the model will need to be reinitialized, which may take additional time (usually less than 20s).
118
  """)
119
  with gr.Row():
120
  with gr.Column():
 
132
  submit_button = gr.Button("Predict Impact", interactive=False)
133
  with gr.Column():
134
  output = gr.Label(label="Predicted Impact")
135
+ gr.Markdown("""
136
+ **Important Notes**
137
+ - It is intended as a tool for research and educational purposes only.
138
+ - Predicted impact is a probabilistic value generated by the model and does not reflect paper quality or novelty.
139
+ - The author takes no responsibility for the prediction results.
140
+ - To identify potentially impactful papers, this study uses the sigmoid+MSE approach to optimize NDCG values (over sigmoid+BCE), resulting in predicted values concentrated between 0.1 and 0.9 due to the sigmoid gradient effect.
141
+ - Generally, it is considered a predicted influence score greater than 0.65 to indicate an impactful paper.
142
+ """)
143
 
144
  # 输入事件绑定
145
  title_input.change(
 
163
  examples=examples,
164
  inputs=[title_input, abstract_input],
165
  outputs=[validation_status, output],
166
+ cache_examples=True
167
  )
168
+
 
 
 
 
 
 
 
169
  iface.launch()