Samarth991 commited on
Commit
cc22a88
1 Parent(s): 274ece9
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -114,11 +114,11 @@ def add_text(history, text):
114
  ##################################################
115
 
116
  css="""
117
- #col-container {max-width: 1080px; margin-left: auto; margin-right: auto;}
118
  """
119
 
120
  title = """
121
- <div style="text-align: center;max-width: 1080px;">
122
  <h1>Chat with Youtube Videos </h1>
123
  <p style="text-align: center;">Upload a youtube link of any lecture or video and you are able to ask QA as chatbot with the tool
124
  It gives you option to use HuggingFace/OpenAI as LLM's, make sure to add your key.
@@ -133,19 +133,18 @@ with gr.Blocks(css=css) as demo:
133
 
134
  with gr.Column():
135
  with gr.Box():
136
- with gr.Row():
137
- LLM_option = gr.Dropdown(['HuggingFace','OpenAI'],label='Large Language Model Selection')
138
- API_key = gr.Textbox(label="Add API key", type="password",autofocus=True)
139
 
140
- with gr.Group():
141
- chatbot = gr.Chatbot(height=300)
142
 
143
  with gr.Row():
144
  question = gr.Textbox(label="Type your question !",lines=1).style(full_width=True)
145
  submit_btn = gr.Button(value="Send message", variant="primary", scale = 1)
146
  clean_chat_btn = gr.Button("Delete Chat")
147
-
148
- with gr.Accordion(label='Advanced options', open=False):
149
  max_new_tokens = gr.Slider(
150
  label='Max new tokens',
151
  minimum=2048,
 
114
  ##################################################
115
 
116
  css="""
117
+ #col-container {max-width: 690px; margin-left: auto; margin-right: auto;}
118
  """
119
 
120
  title = """
121
+ <div style="text-align: center;max-width: 690px;">
122
  <h1>Chat with Youtube Videos </h1>
123
  <p style="text-align: center;">Upload a youtube link of any lecture or video and you are able to ask QA as chatbot with the tool
124
  It gives you option to use HuggingFace/OpenAI as LLM's, make sure to add your key.
 
133
 
134
  with gr.Column():
135
  with gr.Box():
136
+ LLM_option = gr.Dropdown(['HuggingFace','OpenAI'],label='Large Language Model Selection')
137
+ API_key = gr.Textbox(label="Add API key", type="password",autofocus=True)
 
138
 
139
+ with gr.Group():
140
+ chatbot = gr.Chatbot(height=250)
141
 
142
  with gr.Row():
143
  question = gr.Textbox(label="Type your question !",lines=1).style(full_width=True)
144
  submit_btn = gr.Button(value="Send message", variant="primary", scale = 1)
145
  clean_chat_btn = gr.Button("Delete Chat")
146
+ with gr.Column():
147
+ with gr.Accordion(label='Advanced options', open=False):
148
  max_new_tokens = gr.Slider(
149
  label='Max new tokens',
150
  minimum=2048,