maomao88 commited on
Commit
b0223ae
·
1 Parent(s): 119afbd

add loading icon

Browse files
backend/__pycache__/hf_model_utils.cpython-313.pyc CHANGED
Binary files a/backend/__pycache__/hf_model_utils.cpython-313.pyc and b/backend/__pycache__/hf_model_utils.cpython-313.pyc differ
 
backend/hf_model_utils.py CHANGED
@@ -108,7 +108,6 @@ def get_model_structure(model_name: str, model_type: str | None):
108
  config = AutoConfig.from_pretrained(model_name, trust_remote_code=True)
109
  with torch.device("meta"):
110
  model = AutoModel.from_config(config, trust_remote_code=True)
111
- print(model)
112
 
113
  structure = {
114
  "model_type": config.model_type,
 
108
  config = AutoConfig.from_pretrained(model_name, trust_remote_code=True)
109
  with torch.device("meta"):
110
  model = AutoModel.from_config(config, trust_remote_code=True)
 
111
 
112
  structure = {
113
  "model_type": config.model_type,
frontend/src/App.jsx CHANGED
@@ -2,6 +2,7 @@ import { useState } from "react";
2
  import ModelInputBar from "./components/ModelInputBar";
3
  import ModelLayersCard from "./components/ModelLayersCard";
4
  import ModelInfo from "./components/ModelInfo";
 
5
 
6
  export default function App() {
7
  const [structure, setStructure] = useState(null);
@@ -66,6 +67,7 @@ export default function App() {
66
  } />
67
  )}
68
  </div>
 
69
 
70
  {/* Model Layers */}
71
  {structure && (
 
2
  import ModelInputBar from "./components/ModelInputBar";
3
  import ModelLayersCard from "./components/ModelLayersCard";
4
  import ModelInfo from "./components/ModelInfo";
5
+ import LoadingSpinner from "./assets/loading";
6
 
7
  export default function App() {
8
  const [structure, setStructure] = useState(null);
 
67
  } />
68
  )}
69
  </div>
70
+ {loading && <LoadingSpinner />}
71
 
72
  {/* Model Layers */}
73
  {structure && (
frontend/src/assets/loading.jsx ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ export default function LoadingSpinner() {
2
+ return (
3
+ <div className="flex items-center justify-center p-10">
4
+ <div className="h-10 w-10 animate-spin rounded-full border-4 border-blue-500 border-t-transparent"></div>
5
+ </div>
6
+ );
7
+ }