@@ -22,6 +22,7 @@ import {
2222 DialogTitle ,
2323 Divider ,
2424 Card ,
25+ Alert ,
2526} from '@mui/joy' ;
2627import { useAPI } from '../../../lib/transformerlab-api-sdk' ;
2728import AudioHistory from './AudioHistory' ;
@@ -133,6 +134,8 @@ export default function Audio() {
133134 experimentInfo ?. config ?. foundation_model_architecture ;
134135 const adaptor = experimentInfo ?. config ?. adaptor || '' ;
135136
137+ const { models } = chatAPI . useModelStatus ( ) ;
138+
136139 // Fetch model config from gallery
137140 const processedModelId = currentModel
138141 ? currentModel . replace ( / \/ / g, '~~~' )
@@ -257,6 +260,7 @@ export default function Audio() {
257260 flexDirection : 'column' ,
258261 height : '100%' ,
259262 overflow : 'hidden' ,
263+ position : 'relative' ,
260264 } }
261265 >
262266 { /* Top Header */ }
@@ -518,6 +522,29 @@ export default function Audio() {
518522 < DialogTitle > Generation Settings</ DialogTitle >
519523 </ ModalDialog >
520524 </ Modal >
525+
526+ { /* No Model Running Modal */ }
527+ < Sheet
528+ sx = { {
529+ position : 'absolute' ,
530+ top : '0%' ,
531+ left : '0%' ,
532+ zIndex : 10000 ,
533+ backgroundColor : 'var(--joy-palette-neutral-softBg)' ,
534+ opacity : 0.9 ,
535+ borderRadius : 'md' ,
536+ padding : 2 ,
537+ height : ! models ?. [ 0 ] ?. id && experimentInfo ? '90dvh' : 'inherit' ,
538+ width : ! models ?. [ 0 ] ?. id && experimentInfo ? '100dvh' : 'inherit' ,
539+ visibility : ! models ?. [ 0 ] ?. id && experimentInfo ? 'visible' : 'hidden' ,
540+ } }
541+ >
542+ < Alert
543+ sx = { { position : 'relative' , top : '50%' , justifyContent : 'center' } }
544+ >
545+ No Model is Running
546+ </ Alert >
547+ </ Sheet >
521548 </ Box >
522549 ) ;
523550}
0 commit comments