Spaces:
Sleeping
Sleeping
Pranjal Gupta
commited on
Commit
·
1ee6c81
1
Parent(s):
3bcf83b
ui changed
Browse files
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 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 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 |
|