dalexanderch commited on
Commit
555d33d
1 Parent(s): 46415b5

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -40,14 +40,14 @@ model3 = torch.load("model3.pt", map_location=torch.device('cpu'))
40
 
41
  def fn(glycan, model):
42
  # Draw graph
43
- graph = glycan_to_nxGraph(glycan)
44
- node_labels = nx.get_node_attributes(graph, 'string_labels')
45
- labels = {i:node_labels[i] for i in range(len(graph.nodes))}
46
- graph = nx.relabel_nodes(graph, labels)
47
- write_dot(graph, "graph.dot")
48
- graph=pgv.AGraph("graph.dot")
49
- graph.layout(prog='dot')
50
- graph.draw("graph.png")
51
  # Perform inference
52
  if model == "No data augmentation":
53
  model_pred = model1
 
40
 
41
  def fn(glycan, model):
42
  # Draw graph
43
+ # graph = glycan_to_nxGraph(glycan)
44
+ # node_labels = nx.get_node_attributes(graph, 'string_labels')
45
+ # labels = {i:node_labels[i] for i in range(len(graph.nodes))}
46
+ # graph = nx.relabel_nodes(graph, labels)
47
+ # write_dot(graph, "graph.dot")
48
+ # graph=pgv.AGraph("graph.dot")
49
+ # graph.layout(prog='dot')
50
+ # graph.draw("graph.png")
51
  # Perform inference
52
  if model == "No data augmentation":
53
  model_pred = model1