Spaces:
Running
on
Zero
Running
on
Zero
Update model_utils.py
Browse files- model_utils.py +2 -1
model_utils.py
CHANGED
@@ -52,7 +52,8 @@ def get_model_summary(model_name):
|
|
52 |
model = model.to(torch.device("cuda" if torch.cuda.is_available() else "cpu"))
|
53 |
|
54 |
model_summary = str(model) if model else "Model architecture not found."
|
55 |
-
|
|
|
56 |
except ValueError as ve:
|
57 |
return "", f"ValueError: {ve}"
|
58 |
except EnvironmentError as ee:
|
|
|
52 |
model = model.to(torch.device("cuda" if torch.cuda.is_available() else "cpu"))
|
53 |
|
54 |
model_summary = str(model) if model else "Model architecture not found."
|
55 |
+
config_content = config.to_json_string() if config else "Configuration not found."
|
56 |
+
return f"## Model Architecture\n\n{model_summary}\n\n## Configuration\n\n{config_content}", ""
|
57 |
except ValueError as ve:
|
58 |
return "", f"ValueError: {ve}"
|
59 |
except EnvironmentError as ee:
|