jchen8000 commited on
Commit
a4018ab
·
verified ·
1 Parent(s): d8d0117

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -107,7 +107,7 @@ def generate_response(query, history, model, temperature, max_tokens, top_p, see
107
 
108
 
109
  additional_inputs = [
110
- gr.Dropdown(choices=["llama-3.1-70b-versatile", "llama-3.1-8b-instant", "llama3-70b-8192", "llama3-8b-8192", "mixtral-8x7b-32768", "gemma2-9b-it", "gemma-7b-it"], value="llama-3.1-70b-versatile", label="Model"),
111
  gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.5, label="Temperature", info="Controls diversity of the generated text. Lower is more deterministic, higher is more creative."),
112
  gr.Slider(minimum=1, maximum=8000, step=1, value=8000, label="Max Tokens", info="The maximum number of tokens that the model can process in a single response.<br>Maximums: 8k for gemma 7b it, gemma2 9b it, llama 7b & 70b, 32k for mixtral 8x7b, 132k for llama 3.1."),
113
  gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.5, label="Top P", info="A method of text generation where a model will only consider the most probable next tokens that make up the probability p."),
@@ -117,9 +117,9 @@ additional_inputs = [
117
  # Create the Gradio interface
118
  with gr.Blocks(theme="Nymbo/Alyx_Theme") as demo:
119
  with gr.Tab("Indexing"):
120
- # pdf_input = gr.File(label="Upload PDF", file_types=[".pdf"])
121
  # pdf_input = gr.Files(height=300, file_count="multiple", file_types=["pdf"], interactive=True, label="Upload PDF documents")
122
- pdf_input = gr.Textbox(label="PDF File")
123
  index_button = gr.Button("Index PDF")
124
  load_sample = gr.Button("Alternatively, Load and Index [Attention Is All You Need.pdf] as a Sample")
125
  sample_description = gr.Markdown("This sample PDF is a seminal paper in the field of machine learning, titled 'Attention Is All You Need' at https://arxiv.org/abs/1706.03762. It introduces the Transformer model, which has become foundational in natural language processing.")
 
107
 
108
 
109
  additional_inputs = [
110
+ gr.Dropdown(choices=["llama-3.3-70b-versatile", "llama-3.1-8b-instant", "llama3-70b-8192", "llama3-8b-8192", "mixtral-8x7b-32768", "gemma2-9b-it"], value="gemma2-9b-it", label="Model"),
111
  gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.5, label="Temperature", info="Controls diversity of the generated text. Lower is more deterministic, higher is more creative."),
112
  gr.Slider(minimum=1, maximum=8000, step=1, value=8000, label="Max Tokens", info="The maximum number of tokens that the model can process in a single response.<br>Maximums: 8k for gemma 7b it, gemma2 9b it, llama 7b & 70b, 32k for mixtral 8x7b, 132k for llama 3.1."),
113
  gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.5, label="Top P", info="A method of text generation where a model will only consider the most probable next tokens that make up the probability p."),
 
117
  # Create the Gradio interface
118
  with gr.Blocks(theme="Nymbo/Alyx_Theme") as demo:
119
  with gr.Tab("Indexing"):
120
+ pdf_input = gr.File(label="Upload PDF", file_types=[".pdf"])
121
  # pdf_input = gr.Files(height=300, file_count="multiple", file_types=["pdf"], interactive=True, label="Upload PDF documents")
122
+ # pdf_input = gr.Textbox(label="PDF File")
123
  index_button = gr.Button("Index PDF")
124
  load_sample = gr.Button("Alternatively, Load and Index [Attention Is All You Need.pdf] as a Sample")
125
  sample_description = gr.Markdown("This sample PDF is a seminal paper in the field of machine learning, titled 'Attention Is All You Need' at https://arxiv.org/abs/1706.03762. It introduces the Transformer model, which has become foundational in natural language processing.")