File size: 2,396 Bytes
47f370d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import { Oid } from 'https://cdn.jsdelivr.net/npm/@mundorum/collections@0.3.1/full.js'

Oid.customize('oid:rest', {
  cid: 'cancer-predictor',
  api: {
    oas: {
      paths: {
        'https://santanche-factory-ml.hf.space/train?train_path={train_path}&test_path={test_path}': {
          'post': {
            operationId: 'train',
            parameters: [
              {name: 'train_path',
               in: 'path'
              },
              {name: 'test_path',
               in: 'path'
              }
            ]
          }
        },
        'https://santanche-factory-ml.hf.space/predict?radius_mean={radius_mean}&texture_mean={texture_mean}&symmetry_mean={symmetry_mean}&fractal_dimension_mean={fractal_dimension_mean}': {
          'get': {
            operationId: 'predict',
            parameters: [
              {name: 'radius_mean',
               in: 'path'
              },
              {name: 'texture_mean',
               in: 'path'
              },
              {name: 'symmetry_mean',
               in: 'path'
              },
              {name: 'fractal_dimension_mean',
               in: 'path'
              }
            ]
          }
        }
      }
    }
  }
})

Oid.customize('oid:rest', {
  cid: 'factory-predictor',
  api: {
    oas: {
      paths: {
        'https://santanche-factory-ml.hf.space/train': {
          'post': {
            operationId: 'train'
          }
        },
        'https://santanche-factory-ml.hf.space/inform_temperature?value={value}': {
          'post': {
            operationId: 'temperature',
            parameters: [
              {name: 'value',
               in: 'path'
              }
            ]
          }
        },
        'https://santanche-factory-ml.hf.space/inform_pressure?value={value}': {
          'post': {
            operationId: 'pressure',
            parameters: [
              {name: 'value',
               in: 'path'
              }
            ]
          }
        }
      }
    }
  }
})

Oid.customize('oid:rest', {
  cid: 'sentiment-analysis',
  api: {
    oas: {
      paths: {
        'https://santanche-sentiment-analysis-oid.hf.space/classify?text={title}': {
          'get': {
            operationId: 'classify',
            parameters: [
              {name: 'title',
               in: 'path'
              }
            ]
          }
        }
      }
    }
  }
})