Update app.py
Browse files
app.py
CHANGED
@@ -15,9 +15,9 @@ print('todo en orden')
|
|
15 |
model = GraphormerForGraphClassification.from_pretrained("PedroLancharesSanchez/graph-regression")
|
16 |
|
17 |
def predict(instancia):
|
18 |
-
|
19 |
-
|
20 |
-
instancia_preprocesada=preprocess_item(
|
21 |
inputs={}
|
22 |
inputs['input_nodes'] = torch.tensor([instancia_preprocesada['input_nodes']])
|
23 |
inputs['input_edges'] = torch.tensor([instancia_preprocesada['input_edges']])
|
|
|
15 |
model = GraphormerForGraphClassification.from_pretrained("PedroLancharesSanchez/graph-regression")
|
16 |
|
17 |
def predict(instancia):
|
18 |
+
with open(instancia, "r") as archivo:
|
19 |
+
datos=json.load(archivo)
|
20 |
+
instancia_preprocesada=preprocess_item(datos)
|
21 |
inputs={}
|
22 |
inputs['input_nodes'] = torch.tensor([instancia_preprocesada['input_nodes']])
|
23 |
inputs['input_edges'] = torch.tensor([instancia_preprocesada['input_edges']])
|