Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,11 +17,7 @@ display_app_header()
|
|
17 |
# UI sidebar parameters ####################################
|
18 |
st.sidebar.header("Loging")
|
19 |
if hg_token :=st.sidebar.text_input('Enter your HG token'):
|
20 |
-
|
21 |
-
subprocess.check_call(["huggingface-cli", "login", "--token", hg_token])
|
22 |
-
st.sidebar.info('Logged', icon="ℹ️")
|
23 |
-
except subprocess.CalledProcessError:
|
24 |
-
st.sidebar.error('Error with token, try again', icon="⚠️")
|
25 |
else:
|
26 |
st.sidebar.warning("enter your token")
|
27 |
|
@@ -202,9 +198,9 @@ if selected_task :
|
|
202 |
response = None
|
203 |
task = dict_hg_tasks[selected_task]
|
204 |
if model:
|
205 |
-
client = InferenceClient(model=model)
|
206 |
else:
|
207 |
-
client = InferenceClient()
|
208 |
uploaded_input,url_input,text_input = display_inputs(task)
|
209 |
prompt_input = display_prompt(task)
|
210 |
context_input = display_context(task)
|
|
|
17 |
# UI sidebar parameters ####################################
|
18 |
st.sidebar.header("Loging")
|
19 |
if hg_token :=st.sidebar.text_input('Enter your HG token'):
|
20 |
+
st.sidebar.info('Logged', icon="ℹ️")
|
|
|
|
|
|
|
|
|
21 |
else:
|
22 |
st.sidebar.warning("enter your token")
|
23 |
|
|
|
198 |
response = None
|
199 |
task = dict_hg_tasks[selected_task]
|
200 |
if model:
|
201 |
+
client = InferenceClient(model=model,token=hg_token)
|
202 |
else:
|
203 |
+
client = InferenceClient(token=hg_token)
|
204 |
uploaded_input,url_input,text_input = display_inputs(task)
|
205 |
prompt_input = display_prompt(task)
|
206 |
context_input = display_context(task)
|