woshixuhao commited on
Commit
a16c42d
·
1 Parent(s): 36ec0a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -8
app.py CHANGED
@@ -26,13 +26,14 @@ theme = gr.themes.Monochrome(
26
  neutral_hue="slate",
27
  )
28
  model_card = f"""
29
- ## Description
30
- It is a app for predicting Rf values of two compounds under different eluents in TLC.
31
- input: smiles of two compounds, such as CC(OCC)=O
32
- output: three images that show the Rf curve with different eluent ratios under PE/EA, DCM/MeOH, PE:Et2O system.
33
-
34
- #Citation
35
- Welcome to cite our work:
 
36
  H. Xu, J. Lin, Q. Liu, Y. Chen, J. Zhang, Y. Yang, M.C. Young, Y. Xu, D. Zhang, F. Mo
37
  High-throughput discovery of chemical structure-polarity relationships combining automation and machine-learning techniques
38
  Chem (2022), pp. 1-13, 10.1016/j.chempr.2022.08.008
@@ -281,7 +282,14 @@ def predict_single(smile,PE,EA,DCM,MeOH,Et20):
281
  return Rf[0]
282
 
283
  if __name__=='__main__':
284
- demo = gr.Interface(fn=predict_single, inputs=["text", "number","number","number","number","number"], outputs='number')
 
 
 
 
 
 
 
285
  demo.launch()
286
  # smile='O=C(OC1C(OC(C)=O)C(OC(C)=O)C(OC(C)=O)C(COC(C)=O)O1)C'
287
  # eluent=[0,0.9,0,0,0]
 
26
  neutral_hue="slate",
27
  )
28
  model_card = f"""
29
+ ## Description\n
30
+ It is a app for predicting Rf values of a compound under given eluents in TLC.\n
31
+ input: smiles of one compounds, such as CC(OCC)=O; \n
32
+ the ratio of five solvents (example: 20 1 0 0 0 for PE:EA=20:1)\n
33
+ output: the predicted Rf value.\n
34
+
35
+ ## Citation
36
+ Welcome to cite our work:\n
37
  H. Xu, J. Lin, Q. Liu, Y. Chen, J. Zhang, Y. Yang, M.C. Young, Y. Xu, D. Zhang, F. Mo
38
  High-throughput discovery of chemical structure-polarity relationships combining automation and machine-learning techniques
39
  Chem (2022), pp. 1-13, 10.1016/j.chempr.2022.08.008
 
282
  return Rf[0]
283
 
284
  if __name__=='__main__':
285
+ with gr.Blocks(theme=theme) as demo:
286
+ gr.Markdown('''
287
+ <div>
288
+ <h1 style='text-align: center'>Rf comparison</h1>
289
+ </div>
290
+ ''')
291
+ gr.Markdown(model_card)
292
+ demo = gr.Interface(fn=predict_single, inputs=["text", "number","number","number","number","number"], outputs='number')
293
  demo.launch()
294
  # smile='O=C(OC1C(OC(C)=O)C(OC(C)=O)C(OC(C)=O)C(COC(C)=O)O1)C'
295
  # eluent=[0,0.9,0,0,0]