Pranjal Gupta commited on
Commit
1ee6c81
·
1 Parent(s): 3bcf83b

ui changed

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -182,12 +182,13 @@ def gradio_rag_wrapper(message, history, token):
182
  with gr.Blocks(title="Contextual RAG Chatbot on Hugging Face Spaces") as demo:
183
  gr.Markdown("## Contextual RAG Chatbot")
184
  gr.Markdown("Please enter your Hugging Face Access Token to access gated models like Llama 3.2. You can generate a token from your [Hugging Face settings](https://huggingface.co/settings/tokens).")
185
-
186
- hf_token_textbox = gr.Textbox(
187
- label="Hugging Face Access Token",
188
- type="password",
189
- interactive=True
190
- )
 
191
 
192
  print("toeken =---------->", hf_token_textbox)
193
 
 
182
  with gr.Blocks(title="Contextual RAG Chatbot on Hugging Face Spaces") as demo:
183
  gr.Markdown("## Contextual RAG Chatbot")
184
  gr.Markdown("Please enter your Hugging Face Access Token to access gated models like Llama 3.2. You can generate a token from your [Hugging Face settings](https://huggingface.co/settings/tokens).")
185
+
186
+ newToken = ""
187
+
188
+ def tokenFunc (value) :
189
+ newToken = value
190
+
191
+ hf_token_textbox = gr.Interface(fn=tokenFunc, inputs="textbox")
192
 
193
  print("toeken =---------->", hf_token_textbox)
194