:see_no_evil: hide unused functions to avoid cluttering api pane.
Browse files
app.py
CHANGED
@@ -96,23 +96,25 @@ def build_model_choices():
|
|
96 |
|
97 |
model_choices = build_model_choices()
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
|
|
|
|
116 |
|
117 |
logo = open('./logo.svg').read()
|
118 |
logo_small = open('./logo-small.svg').read()
|
@@ -195,9 +197,9 @@ with gr.Blocks(title_text, css=css) as demo:
|
|
195 |
<div class="row">and follow us <a href="https://x.com/featherless.ai">on twitter</a>!</div> -->
|
196 |
</div>
|
197 |
""")
|
198 |
-
def update_initial_model_choice(request: gr.Request):
|
199 |
-
|
200 |
|
201 |
-
demo.load(update_initial_model_choice, outputs=model_selector)
|
202 |
|
203 |
demo.launch()
|
|
|
96 |
|
97 |
model_choices = build_model_choices()
|
98 |
|
99 |
+
initial_model = QWEN25_72B
|
100 |
+
# this doesn't work in HF spaces because we're iframed :(
|
101 |
+
# def initial_model(referer=None):
|
102 |
+
# return REFLECTION
|
103 |
+
|
104 |
+
# if referer == 'http://127.0.0.1:7860/':
|
105 |
+
# return 'Sao10K/Venomia-1.1-m7'
|
106 |
+
|
107 |
+
# if referer and referer.startswith("https://huggingface.co/"):
|
108 |
+
# possible_model = referer[23:]
|
109 |
+
# full_model_list = functools.reduce(lambda x,y: x+y, model_cache.values(), [])
|
110 |
+
# model_is_supported = possible_model in full_model_list
|
111 |
+
# if model_is_supported:
|
112 |
+
# return possible_model
|
113 |
+
|
114 |
+
# # let's use a random but different model each day.
|
115 |
+
# key=os.environ.get('RANDOM_SEED', 'kcOtfNHA+e')
|
116 |
+
# o = random.Random(f"{key}-{datetime.date.today().strftime('%Y-%m-%d')}")
|
117 |
+
# return o.choice(model_choices)[1]
|
118 |
|
119 |
logo = open('./logo.svg').read()
|
120 |
logo_small = open('./logo-small.svg').read()
|
|
|
197 |
<div class="row">and follow us <a href="https://x.com/featherless.ai">on twitter</a>!</div> -->
|
198 |
</div>
|
199 |
""")
|
200 |
+
# def update_initial_model_choice(request: gr.Request):
|
201 |
+
# return initial_model(request.headers.get('referer'))
|
202 |
|
203 |
+
# demo.load(update_initial_model_choice, outputs=model_selector)
|
204 |
|
205 |
demo.launch()
|