baxin commited on
Commit
42889e6
·
1 Parent(s): 436140f

remove use_optillm

Browse files
Files changed (1) hide show
  1. app.py +1 -11
app.py CHANGED
@@ -72,8 +72,6 @@ with st.sidebar:
72
  step=512,
73
  help="Max tokens for the LLM's text prompt response."
74
  )
75
- use_optillm = st.toggle(
76
- "Use Optillm (for Cerebras)", value=False)
77
 
78
 
79
  # --- メインアプリケーションロジック ---
@@ -90,15 +88,7 @@ if not cerebras_api_key:
90
  llm_client = None
91
  image_client = None
92
  try:
93
- if use_optillm:
94
- if not hasattr(config, 'BASE_URL') or not config.BASE_URL:
95
- st.error("Optillm selected, but BASE_URL is not configured.", icon="🚨")
96
- st.stop()
97
- llm_client = openai.OpenAI(
98
- base_url=config.BASE_URL, api_key=cerebras_api_key)
99
- else:
100
- llm_client = Cerebras(api_key=cerebras_api_key)
101
-
102
  except Exception as e:
103
  st.error(f"Failed to initialize API client(s): {str(e)}", icon="🚨")
104
  st.stop()
 
72
  step=512,
73
  help="Max tokens for the LLM's text prompt response."
74
  )
 
 
75
 
76
 
77
  # --- メインアプリケーションロジック ---
 
88
  llm_client = None
89
  image_client = None
90
  try:
91
+ llm_client = Cerebras(api_key=cerebras_api_key)
 
 
 
 
 
 
 
 
92
  except Exception as e:
93
  st.error(f"Failed to initialize API client(s): {str(e)}", icon="🚨")
94
  st.stop()