boldhasnain commited on
Commit
2b8be0d
·
verified ·
1 Parent(s): 751ea51

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -1,5 +1,4 @@
1
 
2
- import os
3
  import gradio as gr
4
  import streamlit as st
5
  from transformers import AutoTokenizer, AutoModelForCausalLM
@@ -11,11 +10,7 @@ from llama_index.core import VectorStoreIndex
11
  from llama_index.llms.huggingface import HuggingFaceLLM
12
  from llama_index.embeddings.huggingface import HuggingFaceEmbedding
13
  import torch
14
- st.title("Hugging Face Authentication")
15
- api_token = st.text_input("Enter your Hugging Face API token:")
16
- if api_token:
17
- # Set the Hugging Face API token as an environment variable
18
- os.environ["HF_HOME"] = api_token
19
 
20
  # Load documents
21
  def extract_text_from_pdf(pdf_path):
 
1
 
 
2
  import gradio as gr
3
  import streamlit as st
4
  from transformers import AutoTokenizer, AutoModelForCausalLM
 
10
  from llama_index.llms.huggingface import HuggingFaceLLM
11
  from llama_index.embeddings.huggingface import HuggingFaceEmbedding
12
  import torch
13
+
 
 
 
 
14
 
15
  # Load documents
16
  def extract_text_from_pdf(pdf_path):