fix loading
Browse files
app.py
CHANGED
|
@@ -820,24 +820,22 @@ def main():
|
|
| 820 |
LOGGER.info(f"FORM {generation_config=}")
|
| 821 |
|
| 822 |
with st.expander("Info"):
|
| 823 |
-
|
| 824 |
-
|
| 825 |
-
|
| 826 |
-
|
| 827 |
-
|
| 828 |
-
|
| 829 |
-
|
| 830 |
-
|
| 831 |
-
|
| 832 |
-
|
| 833 |
-
|
| 834 |
-
|
| 835 |
-
|
| 836 |
-
|
| 837 |
-
|
| 838 |
-
|
| 839 |
-
st.caption("Model")
|
| 840 |
-
st.write(model_card)
|
| 841 |
|
| 842 |
# st.write(f"Model max length: {AutoTokenizer.from_pretrained(model).model_max_length}")
|
| 843 |
|
|
|
|
| 820 |
LOGGER.info(f"FORM {generation_config=}")
|
| 821 |
|
| 822 |
with st.expander("Info"):
|
| 823 |
+
if "dataset_name" in st.session_state:
|
| 824 |
+
try:
|
| 825 |
+
data_card = dataset_info(st.session_state.dataset_name).cardData
|
| 826 |
+
st.caption("Dataset")
|
| 827 |
+
st.write(data_card)
|
| 828 |
+
except (HFValidationError, RepositoryNotFoundError):
|
| 829 |
+
pass
|
| 830 |
+
|
| 831 |
+
if "api_call_function" in st.session_state:
|
| 832 |
+
try:
|
| 833 |
+
model_info_response = model_info(model)
|
| 834 |
+
model_card = model_info_response.cardData
|
| 835 |
+
st.caption("Model")
|
| 836 |
+
st.write(model_card)
|
| 837 |
+
except (HFValidationError, RepositoryNotFoundError):
|
| 838 |
+
pass
|
|
|
|
|
|
|
| 839 |
|
| 840 |
# st.write(f"Model max length: {AutoTokenizer.from_pretrained(model).model_max_length}")
|
| 841 |
|