Update app.py
Browse files
app.py
CHANGED
@@ -19,20 +19,26 @@ def greet(name):
|
|
19 |
sf_output = [tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=True).replace(" ","") for g in molecules]
|
20 |
return sf_output
|
21 |
|
|
|
|
|
|
|
|
|
22 |
|
23 |
examples = [
|
24 |
|
25 |
-
'[C][=C][C][=C][C][=C][Ring1][=Branch1]',
|
26 |
'[C][=C][C][=C][C][=C][Ring1][=Branch1]'
|
27 |
'[C][=C][C][=C][C][=C][C][=C][Ring1][=Branch1]'
|
28 |
'[C][=C][C][=C][C][=C][Ring1][=Branch1][C][=C][C][=C]'
|
29 |
'[C][=C][C][=C][C][=C][Ring1][=Branch1][C@H1][C][=C][C]'
|
30 |
-
'[C][=C][C][=C][C][=C][Ring1][=Branch1][C@H1][=C][C][=C]'
|
|
|
31 |
]
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
-
iface = gr.Interface(fn=greet, inputs="text", outputs="text",
|
|
|
38 |
iface.launch()
|
|
|
19 |
sf_output = [tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=True).replace(" ","") for g in molecules]
|
20 |
return sf_output
|
21 |
|
22 |
+
inputs = [
|
23 |
+
gr.Textbox(label='input'),
|
24 |
+
gr.Textbox(label='output')
|
25 |
+
]
|
26 |
|
27 |
examples = [
|
28 |
|
29 |
+
['[C][=C][C][=C][C][=C][Ring1][=Branch1]',
|
30 |
'[C][=C][C][=C][C][=C][Ring1][=Branch1]'
|
31 |
'[C][=C][C][=C][C][=C][C][=C][Ring1][=Branch1]'
|
32 |
'[C][=C][C][=C][C][=C][Ring1][=Branch1][C][=C][C][=C]'
|
33 |
'[C][=C][C][=C][C][=C][Ring1][=Branch1][C@H1][C][=C][C]'
|
34 |
+
'[C][=C][C][=C][C][=C][Ring1][=Branch1][C@H1][=C][C][=C]']
|
35 |
+
|
36 |
]
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
+
iface = gr.Interface(fn=greet, inputs="text", outputs="text", inputs=inputs,
|
43 |
+
examples=examples, )
|
44 |
iface.launch()
|