ramwar commited on
Commit
549f5fd
·
1 Parent(s): 86cfde8

latest version

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -27,6 +27,8 @@ question_examples = [
27
  "Why doesn't Captain Nemo hate the society?"
28
  ]
29
 
 
 
30
  # used repository for llm
31
  REPO_ID = "declare-lab/flan-alpaca-large"
32
 
@@ -70,11 +72,11 @@ with gr.Blocks() as demo:
70
  ask questions about the content of the book.
71
  """
72
  )
73
- textfile = gr.File(label="Drag your EPUB book here")
74
  ask_textbox = gr.Textbox(label="Question")
75
  sample_questions = gr.Examples(examples=question_examples, inputs=[ask_textbox])
76
  ask_button = gr.Button("Ask your book")
77
- clear_button = gr.Button("Clear chat")
78
  chatbot = gr.Chatbot(label="Conversation")
79
 
80
  textfile.change(fn=read_textfile, inputs=[textfile], outputs=[])
 
27
  "Why doesn't Captain Nemo hate the society?"
28
  ]
29
 
30
+ os.environ.get("HUGGINGFACEHUB_API_TOKEN")
31
+
32
  # used repository for llm
33
  REPO_ID = "declare-lab/flan-alpaca-large"
34
 
 
72
  ask questions about the content of the book.
73
  """
74
  )
75
+ textfile = gr.File(label="Drag your book here")
76
  ask_textbox = gr.Textbox(label="Question")
77
  sample_questions = gr.Examples(examples=question_examples, inputs=[ask_textbox])
78
  ask_button = gr.Button("Ask your book")
79
+ clear_button = gr.Button("Clear conversation")
80
  chatbot = gr.Chatbot(label="Conversation")
81
 
82
  textfile.change(fn=read_textfile, inputs=[textfile], outputs=[])