mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
Merge pull request #326 from gradio-app/abidlabs/label-bug
Fixed node on windows; fixed label bug with HF theme
This commit is contained in:
commit
4105932443
26719
frontend/package-lock.json
generated
26719
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -33,9 +33,9 @@
|
||||
"webpack": "^4.44.2"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "REACT_APP_BACKEND_URL='http://localhost:7860/' craco start",
|
||||
"start": "cross-env REACT_APP_BACKEND_URL='http://localhost:7860/' craco start",
|
||||
"format": "prettier-eslint --write '**/*.js*'",
|
||||
"build": "REACT_APP_BACKEND_URL='' GENERATE_SOURCEMAP=false craco build",
|
||||
"build": "cross-env REACT_APP_BACKEND_URL='' GENERATE_SOURCEMAP=false craco build",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
"eslintConfig": {
|
||||
@ -57,6 +57,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^9.8.6",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^7.32.0",
|
||||
"mini-css-extract-plugin": "^0.11.3",
|
||||
"postcss": "^7.0.36",
|
||||
|
@ -28,16 +28,21 @@ class LabelOutput extends BaseComponent {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<div className="output_label">
|
||||
<div className="output_class">{this.props.value["label"]}</div>
|
||||
<div className="confidence_intervals">
|
||||
<div className="labels" style={{ maxWidth: "120px" }}>
|
||||
{labels}
|
||||
</div>
|
||||
<div className="confidences">{confidences}</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<div className="output_label">
|
||||
<div className="output_class">{this.props.value["label"]}</div>
|
||||
<div className="confidence_intervals">
|
||||
<div className="labels" style={{ maxWidth: "120px" }}>
|
||||
{labels}
|
||||
</div>
|
||||
<div className="confidences">{confidences}</div>
|
||||
</div>
|
||||
<div className="output_class_without_confidences">{this.props.value["label"]}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -39,24 +39,22 @@ export class GradioPage extends React.Component {
|
||||
false
|
||||
)}
|
||||
</div>
|
||||
<a href="/api/" target="_blank" class="footer" rel="noreferrer">
|
||||
<span>view the api </span>
|
||||
<img
|
||||
class="logo"
|
||||
src="https://i.ibb.co/6DVLqmf/noun-tools-2220412.png"
|
||||
alt="logo"
|
||||
/>
|
||||
<span> |</span>
|
||||
<a
|
||||
href="https://gradio.app"
|
||||
target="_blank"
|
||||
className="footer"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<span> built with</span>
|
||||
<img className="logo" src={logo} alt="logo" />
|
||||
</a>
|
||||
<div className="footer">
|
||||
<a
|
||||
href="/api/"
|
||||
target="_blank"
|
||||
className="footer"
|
||||
rel="noreferrer">
|
||||
view the api <img className="logo" src="https://i.ibb.co/6DVLqmf/noun-tools-2220412.png" alt="api"/>
|
||||
</a> | <a
|
||||
href="https://gradio.app"
|
||||
target="_blank"
|
||||
className="footer"
|
||||
rel="noreferrer"
|
||||
> built with
|
||||
<img className="logo" src={logo} alt="logo" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
@ -17,10 +17,10 @@
|
||||
@apply flex-grow flex-shrink-0;
|
||||
}
|
||||
.footer {
|
||||
@apply flex-shrink-0 flex gap-1 items-center text-gray-400 dark:text-gray-50 justify-center py-2;
|
||||
@apply flex-shrink-0 inline-flex gap-1 items-center text-gray-400 dark:text-gray-50 justify-center py-2;
|
||||
}
|
||||
.api {
|
||||
@apply flex-shrink-0 flex gap-1 items-center text-gray-400 dark:text-gray-50 justify-end py-2;
|
||||
@apply flex-shrink-0 inline-flex gap-1 items-center text-gray-400 dark:text-gray-50 justify-end py-2;
|
||||
}
|
||||
.logo {
|
||||
@apply h-6;
|
||||
@ -512,7 +512,8 @@
|
||||
}
|
||||
.output_label {
|
||||
@apply dark:text-gray-50;
|
||||
.output_class {
|
||||
.output_class,
|
||||
.output_class_without_confidences {
|
||||
@apply font-bold text-2xl py-8 px-4 flex-grow flex items-center justify-center;
|
||||
}
|
||||
.confidence_intervals {
|
||||
|
@ -459,8 +459,10 @@ html {
|
||||
word-break: break-word;
|
||||
@apply w-full bg-white dark:text-blue-900 dark:font-semibold dark:bg-gray-200 border-gray-400 box-border p-1 whitespace-pre-wrap;
|
||||
}
|
||||
|
||||
.output_label {
|
||||
.output_class {
|
||||
.output_class,
|
||||
.output_class_without_confidences {
|
||||
@apply font-bold text-xl py-6 px-4 flex-grow flex items-center justify-center;
|
||||
}
|
||||
.confidence_intervals {
|
||||
|
@ -456,6 +456,9 @@
|
||||
.output_class {
|
||||
@apply hidden;
|
||||
}
|
||||
.output_class_without_confidences{
|
||||
@apply font-bold text-2xl py-8 px-4 flex-grow flex items-center justify-center dark:text-gray-50;
|
||||
}
|
||||
.confidence_intervals {
|
||||
@apply flex text-xl;
|
||||
}
|
||||
|
@ -464,7 +464,8 @@
|
||||
}
|
||||
.output_label {
|
||||
@apply dark:text-gray-50;
|
||||
.output_class {
|
||||
.output_class,
|
||||
.output_class_without_confidences {
|
||||
@apply font-bold text-2xl py-8 px-4 flex-grow flex items-center justify-center;
|
||||
}
|
||||
.confidence_intervals {
|
||||
|
@ -1,18 +1,18 @@
|
||||
{
|
||||
"files": {
|
||||
"main.css": "/static/css/main.e23a1a2e.css",
|
||||
"main.css": "/static/css/main.2dbfc005.css",
|
||||
"main.js": "/static/bundle.js",
|
||||
"index.html": "/index.html",
|
||||
"static/media/arrow-left.e497f657.svg": "/static/media/arrow-left.e497f657.svg",
|
||||
"static/media/arrow-right.ea6059fd.svg": "/static/media/arrow-right.ea6059fd.svg",
|
||||
"static/media/clear.33f9b5f3.svg": "/static/media/clear.33f9b5f3.svg",
|
||||
"static/media/edit.44bd4fe1.svg": "/static/media/edit.44bd4fe1.svg",
|
||||
"static/media/logo.411acfd1.svg": "/static/media/logo.411acfd1.svg",
|
||||
"static/media/arrow-left.794a4706.svg": "/static/media/arrow-left.794a4706.svg",
|
||||
"static/media/arrow-right.5a7d4ada.svg": "/static/media/arrow-right.5a7d4ada.svg",
|
||||
"static/media/clear.85cf6de8.svg": "/static/media/clear.85cf6de8.svg",
|
||||
"static/media/edit.c6b7d6f7.svg": "/static/media/edit.c6b7d6f7.svg",
|
||||
"static/media/logo.36a8f455.svg": "/static/media/logo.36a8f455.svg",
|
||||
"static/media/logo_loading.e93acd82.jpg": "/static/media/logo_loading.e93acd82.jpg"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/bundle.css",
|
||||
"static/css/main.e23a1a2e.css",
|
||||
"static/css/main.2dbfc005.css",
|
||||
"static/bundle.js"
|
||||
]
|
||||
}
|
@ -8,4 +8,4 @@
|
||||
window.config = {{ config|tojson }};
|
||||
} catch (e) {
|
||||
window.config = {};
|
||||
}</script><script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.1/iframeResizer.contentWindow.min.js"></script><title>Gradio</title><link href="static/bundle.css" rel="stylesheet"><link href="static/css/main.e23a1a2e.css" rel="stylesheet"></head><body style="height:100%"><div id="root" style="height:100%"></div><script src="static/bundle.js"></script></body></html>
|
||||
}</script><script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.1/iframeResizer.contentWindow.min.js"></script><title>Gradio</title><link href="static/bundle.css" rel="stylesheet"><link href="static/css/main.2dbfc005.css" rel="stylesheet"></head><body style="height:100%"><div id="root" style="height:100%"></div><script src="static/bundle.js"></script></body></html>
|
Loading…
Reference in New Issue
Block a user