Makes it possible to set the initial camera position for the Model3D component as a tuple of (alpha, beta, radius) (#5266)

* Allow setting alpha

* Allow setting beta and radius

* Formatting

* Change to tuple of (alpha, beta, radius)

* Renamed parameter

* Formatting

* add changeset

* add to update

* Change to tuple of (alpha, beta, radius)

* Renamed parameter

* Formatting

* Docstring for Model3D

* rename parameter

* add changeset

* type

* 180

* dupe

* 180

* linting

* lint

* lint

* add test

* Formatting in docstring + added what unit the angles are

* Added babylon types to model3d's package.json

* pnpm lockfile

* Type narrowing of helperCamera + assumed not null

* refactor

* docstring

* lint

* type checking

* fix test

---------

Co-authored-by: Mehdi <mehdi.bahri@epicgames.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
Mehdi Bahri 2023-08-30 01:02:05 +01:00 committed by GitHub
parent 119c834331
commit 4ccb9a86f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 1583 additions and 1599 deletions

View File

@ -0,0 +1,6 @@
---
"@gradio/model3d": minor
"gradio": minor
---
feat:Makes it possible to set the initial camera position for the `Model3D` component as a tuple of (alpha, beta, radius)

View File

@ -37,10 +37,17 @@ class Model3D(
self,
value: str | Callable | None = None,
*,
clear_color: list[float] | None = None,
clear_color: tuple[float, float, float, float] | None = None,
camera_position: tuple[
int | float | None, int | float | None, int | float | None
] = (
None,
None,
None,
),
label: str | None = None,
every: float | None = None,
show_label: bool | None = None,
every: float | None = None,
container: bool = True,
scale: int | None = None,
min_width: int = 160,
@ -52,10 +59,11 @@ class Model3D(
"""
Parameters:
value: path to (.obj, glb, or .gltf) file to show in model3D viewer. If callable, the function will be called whenever the app loads to set the initial value of the component.
clear_color: background color of scene
clear_color: background color of scene, should be a tuple of 4 floats between 0 and 1 representing RGBA values.
camera_position: initial camera position of scene, provided as a tuple of `(alpha, beta, radius)`. Each value is optional. If provided, `alpha` and `beta` should be in degrees reflecting the angular position along the longitudinal and latitudinal axes, respectively. Radius corresponds to the distance from the center of the object to the camera.
label: component name in interface.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
@ -64,6 +72,8 @@ class Model3D(
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
"""
self.clear_color = clear_color or [0, 0, 0, 0]
self.camera_position = camera_position
IOComponent.__init__(
self,
label=label,
@ -81,8 +91,9 @@ class Model3D(
def get_config(self):
return {
"clearColor": self.clear_color,
"clear_color": self.clear_color,
"value": self.value,
"camera_position": self.camera_position,
**IOComponent.get_config(self),
}
@ -95,6 +106,11 @@ class Model3D(
@staticmethod
def update(
value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE,
camera_position: tuple[
int | float | None, int | float | None, int | float | None
]
| None = None,
clear_color: tuple[float, float, float, float] | None = None,
label: str | None = None,
show_label: bool | None = None,
container: bool | None = None,
@ -103,6 +119,8 @@ class Model3D(
visible: bool | None = None,
):
updated_config = {
"camera_position": camera_position,
"clear_color": clear_color,
"label": label,
"show_label": show_label,
"container": container,

View File

@ -15,7 +15,7 @@
export let value: null | FileData = null;
export let root: string;
export let root_url: null | string;
export let clearColor: [number, number, number, number];
export let clear_color: [number, number, number, number];
export let loading_status: LoadingStatus;
export let label: string;
export let show_label: boolean;
@ -27,6 +27,13 @@
clear: never;
}>;
// alpha, beta, radius
export let camera_position: [number | null, number | null, number | null] = [
null,
null,
null
];
let _value: null | FileData;
$: _value = normalise_file(value, root, root_url);
@ -49,8 +56,9 @@
<Model3DUpload
{label}
{show_label}
{clearColor}
{clear_color}
value={_value}
{camera_position}
on:change={({ detail }) => (value = detail)}
on:drag={({ detail }) => (dragging = detail)}
on:change={({ detail }) => gradio.dispatch("change", detail)}

View File

@ -4,17 +4,25 @@
import type { FileData } from "@gradio/upload";
import { BlockLabel } from "@gradio/atoms";
import { File } from "@gradio/icons";
import { add_new_model } from "../shared/utils";
export let value: null | FileData;
export let clearColor: [number, number, number, number] = [0, 0, 0, 0];
export let clear_color: [number, number, number, number] = [0, 0, 0, 0];
export let label = "";
export let show_label: boolean;
// alpha, beta, radius
export let camera_position: [number | null, number | null, number | null] = [
null,
null,
null
];
let mounted = false;
onMount(() => {
if (value != null) {
addNewModel();
add_new_model(canvas, scene, engine, value, clear_color, camera_position);
}
mounted = true;
});
@ -25,7 +33,11 @@
name: undefined
});
$: canvas && mounted && data != null && is_file && addNewModel();
$: canvas &&
mounted &&
data != null &&
is_file &&
add_new_model(canvas, scene, engine, value, clear_color, camera_position);
async function handle_upload({
detail
@ -33,7 +45,7 @@
value = detail;
await tick();
dispatch("change", value);
addNewModel();
add_new_model(canvas, scene, engine, value, clear_color, camera_position);
}
async function handle_clear(): Promise<void> {
@ -63,51 +75,6 @@
let scene: BABYLON.Scene;
let engine: BABYLON.Engine;
function addNewModel(): void {
if (scene && !scene.isDisposed && engine) {
scene.dispose();
engine.dispose();
}
engine = new BABYLON.Engine(canvas, true);
scene = new BABYLON.Scene(engine);
scene.createDefaultCameraOrLight();
scene.clearColor = scene.clearColor = new BABYLON.Color4(...clearColor);
engine.runRenderLoop(() => {
scene.render();
});
window.addEventListener("resize", () => {
engine.resize();
});
if (!value) return;
let url: string;
if (value.is_file) {
url = value.data;
} else {
let base64_model_content = value.data;
let raw_content = BABYLON.Tools.DecodeBase64(base64_model_content);
let blob = new Blob([raw_content]);
url = URL.createObjectURL(blob);
}
BABYLON.SceneLoader.ShowLoadingScreen = false;
BABYLON.SceneLoader.Append(
url,
"",
scene,
() => {
scene.createDefaultCamera(true, true, true);
},
undefined,
undefined,
"." + value.name.split(".")[1]
);
}
$: dispatch("drag", dragging);
</script>

View File

@ -13,6 +13,7 @@
"@gradio/statustracker": "workspace:^",
"@gradio/upload": "workspace:^",
"@gradio/utils": "workspace:^",
"@types/babylon": "^6.16.6",
"babylonjs": "^4.2.1",
"babylonjs-loaders": "^4.2.1"
},

View File

@ -0,0 +1,68 @@
import type { FileData } from "@gradio/upload";
import * as BABYLON from "babylonjs";
export const add_new_model = (
canvas: HTMLCanvasElement,
scene: BABYLON.Scene,
engine: BABYLON.Engine,
value: FileData | null,
clear_color: [number, number, number, number],
camera_position: [number | null, number | null, number | null]
): void => {
if (scene && !scene.isDisposed && engine) {
scene.dispose();
engine.dispose();
}
engine = new BABYLON.Engine(canvas, true);
scene = new BABYLON.Scene(engine);
scene.createDefaultCameraOrLight();
scene.clearColor = scene.clearColor = new BABYLON.Color4(...clear_color);
engine.runRenderLoop(() => {
scene.render();
});
window.addEventListener("resize", () => {
engine.resize();
});
if (!value) return;
let url: string;
if (value.is_file) {
url = value.data;
} else {
let base64_model_content = value.data;
let raw_content = BABYLON.Tools.DecodeBase64(base64_model_content);
let blob = new Blob([raw_content]);
url = URL.createObjectURL(blob);
}
BABYLON.SceneLoader.ShowLoadingScreen = false;
BABYLON.SceneLoader.Append(
url,
"",
scene,
() => {
// scene.createDefaultCamera(createArcRotateCamera, replace, attachCameraControls)
scene.createDefaultCamera(true, true, true);
// scene.activeCamera has to be an ArcRotateCamera if the call succeeds,
// we assume it does
var helperCamera = scene.activeCamera! as BABYLON.ArcRotateCamera;
if (camera_position[0] !== null) {
helperCamera.alpha = (Math.PI * camera_position[0]) / 180;
}
if (camera_position[1] !== null) {
helperCamera.beta = (Math.PI * camera_position[1]) / 180;
}
if (camera_position[2] !== null) {
helperCamera.radius = camera_position[2];
}
},
undefined,
undefined,
"." + value.name.split(".")[1]
);
};

View File

@ -2,22 +2,29 @@
import type { FileData } from "@gradio/upload";
import { BlockLabel, IconButton } from "@gradio/atoms";
import { File, Download } from "@gradio/icons";
import { add_new_model } from "../shared/utils";
import { _ } from "svelte-i18n";
import { onMount } from "svelte";
import * as BABYLON from "babylonjs";
import * as BABYLON_LOADERS from "babylonjs-loaders";
export let value: FileData | null;
export let clearColor: [number, number, number, number] = [0, 0, 0, 0];
export let clear_color: [number, number, number, number] = [0, 0, 0, 0];
export let label = "";
export let show_label: boolean;
// alpha, beta, radius
export let camera_position: [number | null, number | null, number | null] = [
null,
null,
null
];
BABYLON_LOADERS.OBJFileLoader.IMPORT_VERTEX_COLORS = true;
let canvas: HTMLCanvasElement;
let scene: BABYLON.Scene;
let engine: BABYLON.Engine | null;
let mounted = false;
onMount(() => {
@ -46,44 +53,9 @@
engine?.resize();
});
}
addNewModel();
}
function addNewModel(): void {
scene = new BABYLON.Scene(engine!);
scene.createDefaultCameraOrLight();
scene.clearColor = new BABYLON.Color4(...clearColor);
engine?.runRenderLoop(() => {
scene.render();
});
if (!value) return;
let url: string;
if (value.is_file) {
url = value.data;
} else {
let base64_model_content = value.data;
let raw_content = BABYLON.Tools.DecodeBase64(base64_model_content);
let blob = new Blob([raw_content]);
url = URL.createObjectURL(blob);
if (engine !== null) {
add_new_model(canvas, scene, engine, value, clear_color, camera_position);
}
BABYLON.SceneLoader.ShowLoadingScreen = false;
BABYLON.SceneLoader.Append(
"",
url,
scene,
() => {
scene.createDefaultCamera(true, true, true);
},
undefined,
undefined,
"." + value["name"].split(".")[1]
);
}
</script>

View File

@ -15,7 +15,7 @@
export let value: null | FileData = null;
export let root: string;
export let root_url: null | string;
export let clearColor: [number, number, number, number];
export let clear_color: [number, number, number, number];
export let loading_status: LoadingStatus;
export let label: string;
export let show_label: boolean;
@ -23,6 +23,13 @@
export let scale: number | null = null;
export let min_width: number | undefined = undefined;
// alpha, beta, radius
export let camera_position: [number | null, number | null, number | null] = [
null,
null,
null
];
let _value: null | FileData;
$: _value = normalise_file(value, root, root_url);
@ -43,7 +50,13 @@
<StatusTracker {...loading_status} />
{#if value}
<Model3D value={_value} {clearColor} {label} {show_label} />
<Model3D
value={_value}
{clear_color}
{label}
{show_label}
{camera_position}
/>
{:else}
<!-- Not ideal but some bugs to work out before we can
make this consistent with other components -->

View File

@ -1,4 +1,4 @@
lockfileVersion: '6.0'
lockfileVersion: '6.1'
settings:
autoInstallPeers: true
@ -976,6 +976,9 @@ importers:
'@gradio/utils':
specifier: workspace:^
version: link:../utils
'@types/babylon':
specifier: ^6.16.6
version: 6.16.6
babylonjs:
specifier: ^4.2.1
version: 4.2.2
@ -6656,6 +6659,10 @@ packages:
/@types/aria-query@5.0.1:
resolution: {integrity: sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==}
/@types/babel-types@7.0.11:
resolution: {integrity: sha512-pkPtJUUY+Vwv6B1inAz55rQvivClHJxc9aVEPPmaq2cbyeMLCiDpbKpcKyX4LAwpNGi+SHBv0tHv6+0gXv0P2A==}
dev: false
/@types/babel__core@7.20.1:
resolution: {integrity: sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==}
dependencies:
@ -6685,6 +6692,12 @@ packages:
'@babel/types': 7.22.5
dev: true
/@types/babylon@6.16.6:
resolution: {integrity: sha512-G4yqdVlhr6YhzLXFKy5F7HtRBU8Y23+iWy7UKthMq/OSQnL1hbsoeXESQ2LY8zEDlknipDG3nRGhUC9tkwvy/w==}
dependencies:
'@types/babel-types': 7.0.11
dev: false
/@types/body-parser@1.19.2:
resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==}
dependencies:

View File

@ -2136,7 +2136,7 @@ class TestModel3D:
"""
component = gr.components.Model3D(None, label="Model")
assert {
"clearColor": [0, 0, 0, 0],
"clear_color": [0, 0, 0, 0],
"value": None,
"label": "Model",
"show_label": True,
@ -2149,6 +2149,7 @@ class TestModel3D:
"container": True,
"min_width": 160,
"scale": None,
"camera_position": (None, None, None),
} == component.get_config()
file = "test/test_files/Box.gltf"

View File

@ -1,477 +1,450 @@
{
"version": "3.41.2",
"mode": "blocks",
"dev_mode": true,
"analytics_enabled": true,
"components": [
{
"id": 1,
"type": "markdown",
"props": {
"value": "# Detect Disease From Scan\nWith this model you can lorem ipsum\n- ipsum 1\n- ipsum 2",
"rtl": false,
"latex_delimiters": [
{
"left": "$",
"right": "$",
"display": false
}
],
"sanitize_html": true,
"name": "markdown",
"visible": true
},
"serializer": "StringSerializable",
"api_info": {
"info": {
"type": "string"
},
"serialized_info": false
},
"example_inputs": {
"raw": "Howdy!",
"serialized": "Howdy!"
}
},
{
"id": 2,
"type": "checkboxgroup",
"props": {
"choices": [
[
"Covid",
"Covid"
],
[
"Malaria",
"Malaria"
],
[
"Lung Cancer",
"Lung Cancer"
]
],
"value": [],
"label": "Disease to Scan For",
"show_label": true,
"container": true,
"min_width": 160,
"name": "checkboxgroup",
"visible": true
},
"serializer": "ListStringSerializable",
"api_info": {
"info": {
"type": "array",
"items": {
"type": "string"
}
},
"serialized_info": false
},
"example_inputs": {
"raw": [
"Covid"
],
"serialized": [
"Covid"
]
}
},
{
"id": 3,
"type": "tabs",
"props": {
"visible": true
}
},
{
"id": 4,
"type": "tabitem",
"props": {
"label": "X-ray",
"visible": true
}
},
{
"id": 5,
"type": "row",
"props": {
"type": "row",
"variant": "default",
"equal_height": true,
"visible": true
}
},
{
"id": 6,
"type": "image",
"props": {
"image_mode": "RGB",
"source": "upload",
"tool": "editor",
"streaming": false,
"mirror_webcam": true,
"brush_color": "#000000",
"mask_opacity": 0.7,
"selectable": false,
"show_share_button": false,
"show_download_button": true,
"show_label": true,
"container": true,
"min_width": 160,
"name": "image",
"visible": true
},
"serializer": "ImgSerializable",
"api_info": {
"info": {
"type": "string",
"description": "base64 representation of an image"
},
"serialized_info": true
},
"example_inputs": {
"raw": "data:image/png;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPIGAM9AQMqGcG9vb6MhJsEdGM8vLx8fH98AANIWAMuQeL8fABkTEPPQ0OM5OSYdGFl5jo+Pj/+pqcsTE78wMFNGQLYmID4dGPvd3UBAQJmTkP+8vH9QUK+vr8ZWSHpzcJMmILdwcLOGcHRQUHxwcK9PT9DQ0O/v70w5MLypoG8wKOuwsP/g4P/Q0IcwKEswKMl8aJ9fX2xjdOtGRs/Pz+Dg4GImIP8gIH0sKEAwKKmTiKZ8aB/f39Wsl+LFt8dgUE9PT5x5aHBwcP+AgP+WltdgYMyZfyywz78AAAAAAAD///8AAP9mZv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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gxsvLThHn1oddQMrXj5DyAQgjEHSAJMWZwS3HPxT/QMbabI/iBCliMLEJKX2EEkomBAUCxRi42VDADxyTYDVogV+wSChqmKxEKCDAYFDFj4OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==",
"serialized": "https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png"
}
},
{
"id": 7,
"type": "json",
"props": {
"show_label": true,
"container": true,
"min_width": 160,
"name": "json",
"visible": true
},
"serializer": "JSONSerializable",
"api_info": {
"info": {
"type": {},
"description": "any valid json"
},
"serialized_info": true
},
"example_inputs": {
"raw": {
"a": 1,
"b": 2
},
"serialized": null
}
},
{
"id": 8,
"type": "button",
"props": {
"value": "Run",
"variant": "secondary",
"interactive": true,
"name": "button",
"visible": true
},
"serializer": "StringSerializable",
"api_info": {
"info": {
"type": "string"
},
"serialized_info": false
},
"example_inputs": {
"raw": "Howdy!",
"serialized": "Howdy!"
}
},
{
"id": 9,
"type": "tabitem",
"props": {
"label": "CT Scan",
"visible": true
}
},
{
"id": 10,
"type": "row",
"props": {
"type": "row",
"variant": "default",
"equal_height": true,
"visible": true
}
},
{
"id": 11,
"type": "image",
"props": {
"image_mode": "RGB",
"source": "upload",
"tool": "editor",
"streaming": false,
"mirror_webcam": true,
"brush_color": "#000000",
"mask_opacity": 0.7,
"selectable": false,
"show_share_button": false,
"show_download_button": true,
"show_label": true,
"container": true,
"min_width": 160,
"name": "image",
"visible": true
},
"serializer": "ImgSerializable",
"api_info": {
"info": {
"type": "string",
"description": "base64 representation of an image"
},
"serialized_info": true
},
"example_inputs": {
"raw": "data:image/png;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPIGAM9AQMqGcG9vb6MhJsEdGM8vLx8fH98AANIWAMuQeL8fABkTEPPQ0OM5OSYdGFl5jo+Pj/+pqcsTE78wMFNGQLYmID4dGPvd3UBAQJmTkP+8vH9QUK+vr8ZWSHpzcJMmILdwcLOGcHRQUHxwcK9PT9DQ0O/v70w5MLypoG8wKOuwsP/g4P/Q0IcwKEswKMl8aJ9fX2xjdOtGRs/Pz+Dg4GImIP8gIH0sKEAwKKmTiKZ8aB/f39Wsl+LFt8dgUE9PT5x5aHBwcP+AgP+WltdgYMyZfyywz78AAAAAAAD///8AAP9mZv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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7Goi2MAxbv6O2kEG56I7CSlRsEFKFVyovDJoIRTg7sugNRDGqCJzJgcKE0ywc0ELm6KBCCJo8DIPFeCWNGcyqNFE06ToAfV0HBRgxsvLThHn1oddQMrXj5DyAQgjEHSAJMWZwS3HPxT/QMbabI/iBCliMLEJKX2EEkomBAUCxRi42VDADxyTYDVogV+wSChqmKxEKCDAYFDFj4OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==",
"serialized": "https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png"
}
},
{
"id": 12,
"type": "json",
"props": {
"show_label": true,
"container": true,
"min_width": 160,
"name": "json",
"visible": true
},
"serializer": "JSONSerializable",
"api_info": {
"info": {
"type": {},
"description": "any valid json"
},
"serialized_info": true
},
"example_inputs": {
"raw": {
"a": 1,
"b": 2
},
"serialized": null
}
},
{
"id": 13,
"type": "button",
"props": {
"value": "Run",
"variant": "secondary",
"interactive": true,
"name": "button",
"visible": true
},
"serializer": "StringSerializable",
"api_info": {
"info": {
"type": "string"
},
"serialized_info": false
},
"example_inputs": {
"raw": "Howdy!",
"serialized": "Howdy!"
}
},
{
"id": 14,
"type": "textbox",
"props": {
"lines": 1,
"max_lines": 20,
"value": "",
"type": "text",
"autofocus": false,
"show_copy_button": false,
"container": true,
"rtl": false,
"show_label": true,
"min_width": 160,
"name": "textbox",
"visible": true
},
"serializer": "StringSerializable",
"api_info": {
"info": {
"type": "string"
},
"serialized_info": false
},
"example_inputs": {
"raw": "Howdy!",
"serialized": "Howdy!"
}
},
{
"id": 15,
"type": "form",
"props": {
"type": "form",
"scale": 0,
"min_width": 0,
"visible": true
}
},
{
"id": 16,
"type": "form",
"props": {
"type": "form",
"scale": 0,
"min_width": 0,
"visible": true
}
}
],
"css": null,
"title": "Gradio",
"space_id": null,
"enable_queue": null,
"show_error": true,
"show_api": true,
"is_colab": false,
"stylesheets": [
"https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&display=swap",
"https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
],
"theme": "default",
"layout": {
"id": 0,
"children": [
{
"id": 1
},
{
"id": 15,
"children": [
{
"id": 2
}
]
},
{
"id": 3,
"children": [
{
"id": 4,
"children": [
{
"id": 5,
"children": [
{
"id": 6
},
{
"id": 7
}
]
},
{
"id": 8
}
]
},
{
"id": 9,
"children": [
{
"id": 10,
"children": [
{
"id": 11
},
{
"id": 12
}
]
},
{
"id": 13
}
]
}
]
},
{
"id": 16,
"children": [
{
"id": 14
}
]
}
]
},
"dependencies": [
{
"targets": [
8
],
"trigger": "click",
"inputs": [
2,
6
],
"outputs": [
7
],
"backend_fn": true,
"js": null,
"queue": null,
"api_name": null,
"scroll_to_output": false,
"show_progress": "full",
"every": null,
"batch": false,
"max_batch_size": 4,
"cancels": [],
"types": {
"continuous": false,
"generator": false
},
"collects_event_data": false,
"trigger_after": null,
"trigger_only_on_success": false
},
{
"targets": [
13
],
"trigger": "click",
"inputs": [
2,
11
],
"outputs": [
12
],
"backend_fn": true,
"js": null,
"queue": null,
"api_name": null,
"scroll_to_output": false,
"show_progress": "full",
"every": null,
"batch": false,
"max_batch_size": 4,
"cancels": [],
"types": {
"continuous": false,
"generator": false
},
"collects_event_data": false,
"trigger_after": null,
"trigger_only_on_success": false
}
]
}
"version": "3.41.2",
"mode": "blocks",
"dev_mode": true,
"analytics_enabled": true,
"components": [
{
"id": 1,
"type": "markdown",
"props": {
"value": "# Detect Disease From Scan\nWith this model you can lorem ipsum\n- ipsum 1\n- ipsum 2",
"rtl": false,
"latex_delimiters": [
{
"left": "$",
"right": "$",
"display": false
}
],
"sanitize_html": true,
"name": "markdown",
"visible": true
},
"serializer": "StringSerializable",
"api_info": {
"info": {
"type": "string"
},
"serialized_info": false
},
"example_inputs": {
"raw": "Howdy!",
"serialized": "Howdy!"
}
},
{
"id": 2,
"type": "checkboxgroup",
"props": {
"choices": [
["Covid", "Covid"],
["Malaria", "Malaria"],
["Lung Cancer", "Lung Cancer"]
],
"value": [],
"label": "Disease to Scan For",
"show_label": true,
"container": true,
"min_width": 160,
"name": "checkboxgroup",
"visible": true
},
"serializer": "ListStringSerializable",
"api_info": {
"info": {
"type": "array",
"items": {
"type": "string"
}
},
"serialized_info": false
},
"example_inputs": {
"raw": ["Covid"],
"serialized": ["Covid"]
}
},
{
"id": 3,
"type": "tabs",
"props": {
"visible": true
}
},
{
"id": 4,
"type": "tabitem",
"props": {
"label": "X-ray",
"visible": true
}
},
{
"id": 5,
"type": "row",
"props": {
"type": "row",
"variant": "default",
"equal_height": true,
"visible": true
}
},
{
"id": 6,
"type": "image",
"props": {
"image_mode": "RGB",
"source": "upload",
"tool": "editor",
"streaming": false,
"mirror_webcam": true,
"brush_color": "#000000",
"mask_opacity": 0.7,
"selectable": false,
"show_share_button": false,
"show_download_button": true,
"show_label": true,
"container": true,
"min_width": 160,
"name": "image",
"visible": true
},
"serializer": "ImgSerializable",
"api_info": {
"info": {
"type": "string",
"description": "base64 representation of an image"
},
"serialized_info": true
},
"example_inputs": {
"raw": "data:image/png;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGb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gE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==",
"serialized": "https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png"
}
},
{
"id": 7,
"type": "json",
"props": {
"show_label": true,
"container": true,
"min_width": 160,
"name": "json",
"visible": true
},
"serializer": "JSONSerializable",
"api_info": {
"info": {
"type": {},
"description": "any valid json"
},
"serialized_info": true
},
"example_inputs": {
"raw": {
"a": 1,
"b": 2
},
"serialized": null
}
},
{
"id": 8,
"type": "button",
"props": {
"value": "Run",
"variant": "secondary",
"interactive": true,
"name": "button",
"visible": true
},
"serializer": "StringSerializable",
"api_info": {
"info": {
"type": "string"
},
"serialized_info": false
},
"example_inputs": {
"raw": "Howdy!",
"serialized": "Howdy!"
}
},
{
"id": 9,
"type": "tabitem",
"props": {
"label": "CT Scan",
"visible": true
}
},
{
"id": 10,
"type": "row",
"props": {
"type": "row",
"variant": "default",
"equal_height": true,
"visible": true
}
},
{
"id": 11,
"type": "image",
"props": {
"image_mode": "RGB",
"source": "upload",
"tool": "editor",
"streaming": false,
"mirror_webcam": true,
"brush_color": "#000000",
"mask_opacity": 0.7,
"selectable": false,
"show_share_button": false,
"show_download_button": true,
"show_label": true,
"container": true,
"min_width": 160,
"name": "image",
"visible": true
},
"serializer": "ImgSerializable",
"api_info": {
"info": {
"type": "string",
"description": "base64 representation of an image"
},
"serialized_info": true
},
"example_inputs": {
"raw": "data:image/png;base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OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==",
"serialized": "https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png"
}
},
{
"id": 12,
"type": "json",
"props": {
"show_label": true,
"container": true,
"min_width": 160,
"name": "json",
"visible": true
},
"serializer": "JSONSerializable",
"api_info": {
"info": {
"type": {},
"description": "any valid json"
},
"serialized_info": true
},
"example_inputs": {
"raw": {
"a": 1,
"b": 2
},
"serialized": null
}
},
{
"id": 13,
"type": "button",
"props": {
"value": "Run",
"variant": "secondary",
"interactive": true,
"name": "button",
"visible": true
},
"serializer": "StringSerializable",
"api_info": {
"info": {
"type": "string"
},
"serialized_info": false
},
"example_inputs": {
"raw": "Howdy!",
"serialized": "Howdy!"
}
},
{
"id": 14,
"type": "textbox",
"props": {
"lines": 1,
"max_lines": 20,
"value": "",
"type": "text",
"autofocus": false,
"show_copy_button": false,
"container": true,
"rtl": false,
"show_label": true,
"min_width": 160,
"name": "textbox",
"visible": true
},
"serializer": "StringSerializable",
"api_info": {
"info": {
"type": "string"
},
"serialized_info": false
},
"example_inputs": {
"raw": "Howdy!",
"serialized": "Howdy!"
}
},
{
"id": 15,
"type": "form",
"props": {
"type": "form",
"scale": 0,
"min_width": 0,
"visible": true
}
},
{
"id": 16,
"type": "form",
"props": {
"type": "form",
"scale": 0,
"min_width": 0,
"visible": true
}
}
],
"css": null,
"title": "Gradio",
"space_id": null,
"enable_queue": null,
"show_error": true,
"show_api": true,
"is_colab": false,
"stylesheets": [
"https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&display=swap",
"https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
],
"theme": "default",
"layout": {
"id": 0,
"children": [
{
"id": 1
},
{
"id": 15,
"children": [
{
"id": 2
}
]
},
{
"id": 3,
"children": [
{
"id": 4,
"children": [
{
"id": 5,
"children": [
{
"id": 6
},
{
"id": 7
}
]
},
{
"id": 8
}
]
},
{
"id": 9,
"children": [
{
"id": 10,
"children": [
{
"id": 11
},
{
"id": 12
}
]
},
{
"id": 13
}
]
}
]
},
{
"id": 16,
"children": [
{
"id": 14
}
]
}
]
},
"dependencies": [
{
"targets": [8],
"trigger": "click",
"inputs": [2, 6],
"outputs": [7],
"backend_fn": true,
"js": null,
"queue": null,
"api_name": null,
"scroll_to_output": false,
"show_progress": "full",
"every": null,
"batch": false,
"max_batch_size": 4,
"cancels": [],
"types": {
"continuous": false,
"generator": false
},
"collects_event_data": false,
"trigger_after": null,
"trigger_only_on_success": false
},
{
"targets": [13],
"trigger": "click",
"inputs": [2, 11],
"outputs": [12],
"backend_fn": true,
"js": null,
"queue": null,
"api_name": null,
"scroll_to_output": false,
"show_progress": "full",
"every": null,
"batch": false,
"max_batch_size": 4,
"cancels": [],
"types": {
"continuous": false,
"generator": false
},
"collects_event_data": false,
"trigger_after": null,
"trigger_only_on_success": false
}
]
}

View File

@ -1,477 +1,450 @@
{
"version": "3.41.2",
"mode": "blocks",
"dev_mode": true,
"analytics_enabled": true,
"components": [
{
"id": 101,
"type": "markdown",
"props": {
"value": "# Detect Disease From Scan\nWith this model you can lorem ipsum\n- ipsum 1\n- ipsum 2",
"rtl": false,
"latex_delimiters": [
{
"left": "$",
"right": "$",
"display": false
}
],
"sanitize_html": true,
"name": "markdown",
"visible": true
},
"serializer": "StringSerializable",
"api_info": {
"info": {
"type": "string"
},
"serialized_info": false
},
"example_inputs": {
"raw": "Howdy!",
"serialized": "Howdy!"
}
},
{
"id": 102,
"type": "checkboxgroup",
"props": {
"choices": [
[
"Covid",
"Covid"
],
[
"Malaria",
"Malaria"
],
[
"Lung Cancer",
"Lung Cancer"
]
],
"value": [],
"label": "Disease to Scan For",
"show_label": true,
"container": true,
"min_width": 160,
"name": "checkboxgroup",
"visible": true
},
"serializer": "ListStringSerializable",
"api_info": {
"info": {
"type": "array",
"items": {
"type": "string"
}
},
"serialized_info": false
},
"example_inputs": {
"raw": [
"Covid"
],
"serialized": [
"Covid"
]
}
},
{
"id": 103,
"type": "tabs",
"props": {
"visible": true
}
},
{
"id": 104,
"type": "tabitem",
"props": {
"label": "X-ray",
"visible": true
}
},
{
"id": 105,
"type": "row",
"props": {
"type": "row",
"variant": "default",
"equal_height": true,
"visible": true
}
},
{
"id": 106,
"type": "image",
"props": {
"image_mode": "RGB",
"source": "upload",
"tool": "editor",
"streaming": false,
"mirror_webcam": true,
"brush_color": "#000000",
"mask_opacity": 0.7,
"selectable": false,
"show_share_button": false,
"show_download_button": true,
"show_label": true,
"container": true,
"min_width": 160,
"name": "image",
"visible": true
},
"serializer": "ImgSerializable",
"api_info": {
"info": {
"type": "string",
"description": "base64 representation of an image"
},
"serialized_info": true
},
"example_inputs": {
"raw": "data:image/png;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9w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Yg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==",
"serialized": "https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png"
}
},
{
"id": 107,
"type": "json",
"props": {
"show_label": true,
"container": true,
"min_width": 160,
"name": "json",
"visible": true
},
"serializer": "JSONSerializable",
"api_info": {
"info": {
"type": {},
"description": "any valid json"
},
"serialized_info": true
},
"example_inputs": {
"raw": {
"a": 1,
"b": 2
},
"serialized": null
}
},
{
"id": 108,
"type": "button",
"props": {
"value": "Run",
"variant": "secondary",
"interactive": true,
"name": "button",
"visible": true
},
"serializer": "StringSerializable",
"api_info": {
"info": {
"type": "string"
},
"serialized_info": false
},
"example_inputs": {
"raw": "Howdy!",
"serialized": "Howdy!"
}
},
{
"id": 109,
"type": "tabitem",
"props": {
"label": "CT Scan",
"visible": true
}
},
{
"id": 110,
"type": "row",
"props": {
"type": "row",
"variant": "default",
"equal_height": true,
"visible": true
}
},
{
"id": 111,
"type": "image",
"props": {
"image_mode": "RGB",
"source": "upload",
"tool": "editor",
"streaming": false,
"mirror_webcam": true,
"brush_color": "#000000",
"mask_opacity": 0.7,
"selectable": false,
"show_share_button": false,
"show_download_button": true,
"show_label": true,
"container": true,
"min_width": 160,
"name": "image",
"visible": true
},
"serializer": "ImgSerializable",
"api_info": {
"info": {
"type": "string",
"description": "base64 representation of an image"
},
"serialized_info": true
},
"example_inputs": {
"raw": "data:image/png;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8P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yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==",
"serialized": "https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png"
}
},
{
"id": 112,
"type": "json",
"props": {
"show_label": true,
"container": true,
"min_width": 160,
"name": "json",
"visible": true
},
"serializer": "JSONSerializable",
"api_info": {
"info": {
"type": {},
"description": "any valid json"
},
"serialized_info": true
},
"example_inputs": {
"raw": {
"a": 1,
"b": 2
},
"serialized": null
}
},
{
"id": 113,
"type": "button",
"props": {
"value": "Run",
"variant": "secondary",
"interactive": true,
"name": "button",
"visible": true
},
"serializer": "StringSerializable",
"api_info": {
"info": {
"type": "string"
},
"serialized_info": false
},
"example_inputs": {
"raw": "Howdy!",
"serialized": "Howdy!"
}
},
{
"id": 114,
"type": "textbox",
"props": {
"lines": 1,
"max_lines": 20,
"value": "",
"type": "text",
"autofocus": false,
"show_copy_button": false,
"container": true,
"rtl": false,
"show_label": true,
"min_width": 160,
"name": "textbox",
"visible": true
},
"serializer": "StringSerializable",
"api_info": {
"info": {
"type": "string"
},
"serialized_info": false
},
"example_inputs": {
"raw": "Howdy!",
"serialized": "Howdy!"
}
},
{
"id": 115,
"type": "form",
"props": {
"type": "form",
"scale": 0,
"min_width": 0,
"visible": true
}
},
{
"id": 116,
"type": "form",
"props": {
"type": "form",
"scale": 0,
"min_width": 0,
"visible": true
}
}
],
"css": null,
"title": "Gradio",
"space_id": null,
"enable_queue": null,
"show_error": true,
"show_api": true,
"is_colab": false,
"stylesheets": [
"https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&display=swap",
"https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
],
"theme": "default",
"layout": {
"id": 100,
"children": [
{
"id": 101
},
{
"id": 115,
"children": [
{
"id": 102
}
]
},
{
"id": 103,
"children": [
{
"id": 104,
"children": [
{
"id": 105,
"children": [
{
"id": 106
},
{
"id": 107
}
]
},
{
"id": 108
}
]
},
{
"id": 109,
"children": [
{
"id": 110,
"children": [
{
"id": 111
},
{
"id": 112
}
]
},
{
"id": 113
}
]
}
]
},
{
"id": 116,
"children": [
{
"id": 114
}
]
}
]
},
"dependencies": [
{
"targets": [
108
],
"trigger": "click",
"inputs": [
102,
106
],
"outputs": [
107
],
"backend_fn": true,
"js": null,
"queue": null,
"api_name": null,
"scroll_to_output": false,
"show_progress": "full",
"every": null,
"batch": false,
"max_batch_size": 4,
"cancels": [],
"types": {
"continuous": false,
"generator": false
},
"collects_event_data": false,
"trigger_after": null,
"trigger_only_on_success": false
},
{
"targets": [
113
],
"trigger": "click",
"inputs": [
102,
111
],
"outputs": [
112
],
"backend_fn": true,
"js": null,
"queue": null,
"api_name": null,
"scroll_to_output": false,
"show_progress": "full",
"every": null,
"batch": false,
"max_batch_size": 4,
"cancels": [],
"types": {
"continuous": false,
"generator": false
},
"collects_event_data": false,
"trigger_after": null,
"trigger_only_on_success": false
}
]
}
"version": "3.41.2",
"mode": "blocks",
"dev_mode": true,
"analytics_enabled": true,
"components": [
{
"id": 101,
"type": "markdown",
"props": {
"value": "# Detect Disease From Scan\nWith this model you can lorem ipsum\n- ipsum 1\n- ipsum 2",
"rtl": false,
"latex_delimiters": [
{
"left": "$",
"right": "$",
"display": false
}
],
"sanitize_html": true,
"name": "markdown",
"visible": true
},
"serializer": "StringSerializable",
"api_info": {
"info": {
"type": "string"
},
"serialized_info": false
},
"example_inputs": {
"raw": "Howdy!",
"serialized": "Howdy!"
}
},
{
"id": 102,
"type": "checkboxgroup",
"props": {
"choices": [
["Covid", "Covid"],
["Malaria", "Malaria"],
["Lung Cancer", "Lung Cancer"]
],
"value": [],
"label": "Disease to Scan For",
"show_label": true,
"container": true,
"min_width": 160,
"name": "checkboxgroup",
"visible": true
},
"serializer": "ListStringSerializable",
"api_info": {
"info": {
"type": "array",
"items": {
"type": "string"
}
},
"serialized_info": false
},
"example_inputs": {
"raw": ["Covid"],
"serialized": ["Covid"]
}
},
{
"id": 103,
"type": "tabs",
"props": {
"visible": true
}
},
{
"id": 104,
"type": "tabitem",
"props": {
"label": "X-ray",
"visible": true
}
},
{
"id": 105,
"type": "row",
"props": {
"type": "row",
"variant": "default",
"equal_height": true,
"visible": true
}
},
{
"id": 106,
"type": "image",
"props": {
"image_mode": "RGB",
"source": "upload",
"tool": "editor",
"streaming": false,
"mirror_webcam": true,
"brush_color": "#000000",
"mask_opacity": 0.7,
"selectable": false,
"show_share_button": false,
"show_download_button": true,
"show_label": true,
"container": true,
"min_width": 160,
"name": "image",
"visible": true
},
"serializer": "ImgSerializable",
"api_info": {
"info": {
"type": "string",
"description": "base64 representation of an image"
},
"serialized_info": true
},
"example_inputs": {
"raw": "data:image/png;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPIGAM9AQMqGcG9vb6MhJsEdGM8vLx8fH98AANIWAMuQeL8fABkTEPPQ0OM5OSYdGFl5jo+Pj/+pqcsTE78wMFNGQLYmID4dGPvd3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AJbo3onOpajiihlO92KHGaUXGwWjUBChjSPiWJuOO/LYIm4v1tXfE6J4gCSJEZ7YgRYUNrkji9P55sF/ogxw5ZkSqIDaZBV6aSGYq/lGZplndkckZ98xoICbTcIJGQAZcNmdmUc210hs35nCyJ58fgmIKX5RQGOZowxaZwYA+JaoKQwswGijBV4C6SiTUmpphMspJx9unX4KaimjDv9aaXOEBteBqmuuxgEHoLX6Kqx+yXqqBANsgCtit4FWQAEkrNbpq7HSOmtwag5w57GrmlJBASEU18ADjUYb3ADTinIttsgSB1oJFfA63bduimuqKB1keqwUhoCSK374wbujvOSu4QG6UvxBRydcpKsav++Ca6G8A6Pr1x2kVMyHwsVxUALDq/krnrhPSOzXG1lUTIoffqGR7Goi2MAxbv6O2kEG56I7CSlRsEFKFVyovDJoIRTg7sugNRDGqCJzJgcKE0ywc0ELm6KBCCJo8DIPFeCWNGcyqNFE06ToAfV0HBRgxsvLThHn1oddQMrXj5DyAQgjEHSAJMWZwS3HPxT/QMbabI/iBCliMLEJKX2EEkomBAUCxRi42VDADxyTYDVogV+wSChqmKxEKCDAYFDFj4OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==",
"serialized": "https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png"
}
},
{
"id": 107,
"type": "json",
"props": {
"show_label": true,
"container": true,
"min_width": 160,
"name": "json",
"visible": true
},
"serializer": "JSONSerializable",
"api_info": {
"info": {
"type": {},
"description": "any valid json"
},
"serialized_info": true
},
"example_inputs": {
"raw": {
"a": 1,
"b": 2
},
"serialized": null
}
},
{
"id": 108,
"type": "button",
"props": {
"value": "Run",
"variant": "secondary",
"interactive": true,
"name": "button",
"visible": true
},
"serializer": "StringSerializable",
"api_info": {
"info": {
"type": "string"
},
"serialized_info": false
},
"example_inputs": {
"raw": "Howdy!",
"serialized": "Howdy!"
}
},
{
"id": 109,
"type": "tabitem",
"props": {
"label": "CT Scan",
"visible": true
}
},
{
"id": 110,
"type": "row",
"props": {
"type": "row",
"variant": "default",
"equal_height": true,
"visible": true
}
},
{
"id": 111,
"type": "image",
"props": {
"image_mode": "RGB",
"source": "upload",
"tool": "editor",
"streaming": false,
"mirror_webcam": true,
"brush_color": "#000000",
"mask_opacity": 0.7,
"selectable": false,
"show_share_button": false,
"show_download_button": true,
"show_label": true,
"container": true,
"min_width": 160,
"name": "image",
"visible": true
},
"serializer": "ImgSerializable",
"api_info": {
"info": {
"type": "string",
"description": "base64 representation of an image"
},
"serialized_info": true
},
"example_inputs": {
"raw": "data:image/png;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPI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VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==",
"serialized": "https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png"
}
},
{
"id": 112,
"type": "json",
"props": {
"show_label": true,
"container": true,
"min_width": 160,
"name": "json",
"visible": true
},
"serializer": "JSONSerializable",
"api_info": {
"info": {
"type": {},
"description": "any valid json"
},
"serialized_info": true
},
"example_inputs": {
"raw": {
"a": 1,
"b": 2
},
"serialized": null
}
},
{
"id": 113,
"type": "button",
"props": {
"value": "Run",
"variant": "secondary",
"interactive": true,
"name": "button",
"visible": true
},
"serializer": "StringSerializable",
"api_info": {
"info": {
"type": "string"
},
"serialized_info": false
},
"example_inputs": {
"raw": "Howdy!",
"serialized": "Howdy!"
}
},
{
"id": 114,
"type": "textbox",
"props": {
"lines": 1,
"max_lines": 20,
"value": "",
"type": "text",
"autofocus": false,
"show_copy_button": false,
"container": true,
"rtl": false,
"show_label": true,
"min_width": 160,
"name": "textbox",
"visible": true
},
"serializer": "StringSerializable",
"api_info": {
"info": {
"type": "string"
},
"serialized_info": false
},
"example_inputs": {
"raw": "Howdy!",
"serialized": "Howdy!"
}
},
{
"id": 115,
"type": "form",
"props": {
"type": "form",
"scale": 0,
"min_width": 0,
"visible": true
}
},
{
"id": 116,
"type": "form",
"props": {
"type": "form",
"scale": 0,
"min_width": 0,
"visible": true
}
}
],
"css": null,
"title": "Gradio",
"space_id": null,
"enable_queue": null,
"show_error": true,
"show_api": true,
"is_colab": false,
"stylesheets": [
"https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&display=swap",
"https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
],
"theme": "default",
"layout": {
"id": 100,
"children": [
{
"id": 101
},
{
"id": 115,
"children": [
{
"id": 102
}
]
},
{
"id": 103,
"children": [
{
"id": 104,
"children": [
{
"id": 105,
"children": [
{
"id": 106
},
{
"id": 107
}
]
},
{
"id": 108
}
]
},
{
"id": 109,
"children": [
{
"id": 110,
"children": [
{
"id": 111
},
{
"id": 112
}
]
},
{
"id": 113
}
]
}
]
},
{
"id": 116,
"children": [
{
"id": 114
}
]
}
]
},
"dependencies": [
{
"targets": [108],
"trigger": "click",
"inputs": [102, 106],
"outputs": [107],
"backend_fn": true,
"js": null,
"queue": null,
"api_name": null,
"scroll_to_output": false,
"show_progress": "full",
"every": null,
"batch": false,
"max_batch_size": 4,
"cancels": [],
"types": {
"continuous": false,
"generator": false
},
"collects_event_data": false,
"trigger_after": null,
"trigger_only_on_success": false
},
{
"targets": [113],
"trigger": "click",
"inputs": [102, 111],
"outputs": [112],
"backend_fn": true,
"js": null,
"queue": null,
"api_name": null,
"scroll_to_output": false,
"show_progress": "full",
"every": null,
"batch": false,
"max_batch_size": 4,
"cancels": [],
"types": {
"continuous": false,
"generator": false
},
"collects_event_data": false,
"trigger_after": null,
"trigger_only_on_success": false
}
]
}

File diff suppressed because it is too large Load Diff