yonikremer
commited on
Commit
•
17edf44
1
Parent(s):
d3e85c8
downloading only the pytorch model and important files, not the other versions of the model
Browse files- hanlde_form_submit.py +2 -2
hanlde_form_submit.py
CHANGED
@@ -4,7 +4,7 @@ from time import time
|
|
4 |
import streamlit as st
|
5 |
from grouped_sampling import GroupedSamplingPipeLine
|
6 |
|
7 |
-
from download_repo import
|
8 |
from prompt_engeneering import rewrite_prompt
|
9 |
from supported_models import is_supported, SUPPORTED_MODEL_NAME_PAGES_FORMAT, BLACKLISTED_MODEL_NAMES, \
|
10 |
BLACKLISTED_ORGANIZATIONS
|
@@ -31,7 +31,7 @@ def create_pipeline(model_name: str, group_size: int) -> GroupedSamplingPipeLine
|
|
31 |
if not is_downloaded(model_name):
|
32 |
download_repository_start_time = time()
|
33 |
st.write(f"Starts downloading model: {model_name} from the internet.")
|
34 |
-
|
35 |
download_repository_end_time = time()
|
36 |
download_time = download_repository_end_time - download_repository_start_time
|
37 |
st.write(f"Finished downloading model: {model_name} from the internet in {download_time:,.2f} seconds.")
|
|
|
4 |
import streamlit as st
|
5 |
from grouped_sampling import GroupedSamplingPipeLine
|
6 |
|
7 |
+
from download_repo import download_pytorch_model
|
8 |
from prompt_engeneering import rewrite_prompt
|
9 |
from supported_models import is_supported, SUPPORTED_MODEL_NAME_PAGES_FORMAT, BLACKLISTED_MODEL_NAMES, \
|
10 |
BLACKLISTED_ORGANIZATIONS
|
|
|
31 |
if not is_downloaded(model_name):
|
32 |
download_repository_start_time = time()
|
33 |
st.write(f"Starts downloading model: {model_name} from the internet.")
|
34 |
+
download_pytorch_model(model_name)
|
35 |
download_repository_end_time = time()
|
36 |
download_time = download_repository_end_time - download_repository_start_time
|
37 |
st.write(f"Finished downloading model: {model_name} from the internet in {download_time:,.2f} seconds.")
|