wxgeorge commited on
Commit
554cf75
1 Parent(s): fcd14c4

:see_no_evil: hide unused functions to avoid cluttering api pane.

Browse files
Files changed (1) hide show
  1. app.py +22 -20
app.py CHANGED
@@ -96,23 +96,25 @@ def build_model_choices():
96
 
97
  model_choices = build_model_choices()
98
 
99
- def initial_model(referer=None):
100
- return "Qwen/Qwen2.5-72B"
101
-
102
- # if referer == 'http://127.0.0.1:7860/':
103
- # return 'Sao10K/Venomia-1.1-m7'
104
-
105
- # if referer and referer.startswith("https://huggingface.co/"):
106
- # possible_model = referer[23:]
107
- # full_model_list = functools.reduce(lambda x,y: x+y, model_cache.values(), [])
108
- # model_is_supported = possible_model in full_model_list
109
- # if model_is_supported:
110
- # return possible_model
111
-
112
- # # let's use a random but different model each day.
113
- # key=os.environ.get('RANDOM_SEED', 'kcOtfNHA+e')
114
- # o = random.Random(f"{key}-{datetime.date.today().strftime('%Y-%m-%d')}")
115
- # return o.choice(model_choices)[1]
 
 
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&nbsp;<a href="https://x.com/featherless.ai">on twitter</a>!</div> -->
196
  </div>
197
  """)
198
- def update_initial_model_choice(request: gr.Request):
199
- return initial_model(request.headers.get('referer'))
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&nbsp;<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()