PedroLancharesSanchez commited on
Commit
f1b97af
·
verified ·
1 Parent(s): ac1e98c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -37,4 +37,14 @@ def predict(instancia):
37
  predicted_class_id = logits.argmax().item()
38
  return str(logits.item())
39
 
40
- gr.Interface(fn=predict, inputs=gr.inputs.Input(type="json"), outputs='text',examples=['grafo1.json','grafo2.json']).launch(share=False)
 
 
 
 
 
 
 
 
 
 
 
37
  predicted_class_id = logits.argmax().item()
38
  return str(logits.item())
39
 
40
+ ejemplos = [
41
+ {"node_feat": [[0],[0],[0],[0],[0],[0],[0],[0],[1],[0],[0],[0],[0],[1],[2],[0],[0],[0],[0],[0],[0],[3],[0],[0]],
42
+ "edge_index": [[0,1,1,1,1,2,3,4,4,4,5,5,6,6,7,7,7,8,8,9,9,10,10,10,11,11,12,12,12,13,14,14,15,15,15,16,16,17,17,18,18,19,19,20,20,20,21,22,22,22,23,23]],
43
+ "edge_attr": [[1],[1],[1],[1],[1],[1],[1],[1],[2],[1],[2],[1],[1],[2],[2],[1],[1],[1],[1],[1],[2],[2],[1],[1],[1],[1],[1],[2],[1],[2],[1],[1],[1],[2],[1],[2],[1],[1],[2],[2],[1],[1],[2],[1],[2],[1],[1],[1],[1],[2],[1],[2]],
44
+ "y": [3.1381945610046387],
45
+ "num_nodes": 24}
46
+ ]
47
+
48
+ # Crear la interfaz Gradio
49
+ interfaz = gr.Interface(fn=predict, inputs="text", outputs='text', examples=ejemplos)
50
+ interfaz.launch(share=False)