yonikremer commited on
Commit
62b2f35
1 Parent(s): bf8a943

stopped checking in models are supported

Browse files
Files changed (1) hide show
  1. hanlde_form_submit.py +0 -11
hanlde_form_submit.py CHANGED
@@ -6,13 +6,6 @@ from grouped_sampling import GroupedSamplingPipeLine
6
 
7
  from download_repo import download_repository
8
  from prompt_engeneering import rewrite_prompt
9
- from supported_models import get_supported_model_names
10
-
11
-
12
- SUPPORTED_MODEL_NAMES = get_supported_model_names(
13
- min_number_of_downloads=1,
14
- min_number_of_likes=1,
15
- )
16
 
17
 
18
  def is_downloaded(model_name: str) -> bool:
@@ -89,10 +82,6 @@ def on_form_submit(model_name: str, output_length: int, prompt: str) -> str:
89
  TypeError: If the output length is not an integer or the prompt is not a string.
90
  RuntimeError: If the model is not found.
91
  """
92
- if model_name not in SUPPORTED_MODEL_NAMES:
93
- raise ValueError(f"The selected model {model_name} is not supported."
94
- f"Supported models are all the models in:"
95
- f" https://huggingface.co/models?pipeline_tag=text-generation&library=pytorch")
96
  if len(prompt) == 0:
97
  raise ValueError(f"The prompt must not be empty.")
98
  st.write(f"Loading model: {model_name}...")
 
6
 
7
  from download_repo import download_repository
8
  from prompt_engeneering import rewrite_prompt
 
 
 
 
 
 
 
9
 
10
 
11
  def is_downloaded(model_name: str) -> bool:
 
82
  TypeError: If the output length is not an integer or the prompt is not a string.
83
  RuntimeError: If the model is not found.
84
  """
 
 
 
 
85
  if len(prompt) == 0:
86
  raise ValueError(f"The prompt must not be empty.")
87
  st.write(f"Loading model: {model_name}...")