Update app.py
Browse files
app.py
CHANGED
@@ -96,7 +96,7 @@ class ModelConverter:
|
|
96 |
"""Convert the model to ONNX format."""
|
97 |
try:
|
98 |
if trust_remote_code:
|
99 |
-
if st.session_state.get("user_hf_token")
|
100 |
result = subprocess.run(
|
101 |
[
|
102 |
sys.executable,
|
@@ -199,7 +199,7 @@ def main():
|
|
199 |
)
|
200 |
trust_remote_code = st.toggle("Trust Remote Code?")
|
201 |
if trust_remote_code:
|
202 |
-
st.warning("Remote code could be used for malicious purposes. Make sure you trust the code fully."
|
203 |
|
204 |
if config.hf_username == input_model_id.split("/")[0]:
|
205 |
same_repo = st.checkbox(
|
@@ -253,4 +253,4 @@ def main():
|
|
253 |
|
254 |
|
255 |
if __name__ == "__main__":
|
256 |
-
main()
|
|
|
96 |
"""Convert the model to ONNX format."""
|
97 |
try:
|
98 |
if trust_remote_code:
|
99 |
+
if st.session_state.get("user_hf_token") != "":
|
100 |
result = subprocess.run(
|
101 |
[
|
102 |
sys.executable,
|
|
|
199 |
)
|
200 |
trust_remote_code = st.toggle("Trust Remote Code?")
|
201 |
if trust_remote_code:
|
202 |
+
st.warning("Remote code could be used for malicious purposes. Make sure you trust the code fully. You must use your own Hugging Face write token.")
|
203 |
|
204 |
if config.hf_username == input_model_id.split("/")[0]:
|
205 |
same_repo = st.checkbox(
|
|
|
253 |
|
254 |
|
255 |
if __name__ == "__main__":
|
256 |
+
main()
|