Samarth991 commited on
Commit
37c010d
·
1 Parent(s): 35a58c0
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -114,11 +114,11 @@ def add_text(history, text):
114
  ##################################################
115
 
116
  css="""
117
- #col-container {max-width: 700px; margin-left: auto; margin-right: auto;}
118
  """
119
 
120
  title = """
121
- <div style="text-align: center;max-width: 700px;">
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.
@@ -132,7 +132,7 @@ with gr.Blocks(css=css) as demo:
132
  gr.HTML(title)
133
 
134
  with gr.Group():
135
- chatbot = gr.Chatbot(height=300)
136
 
137
  with gr.Row():
138
  question = gr.Textbox(label="Type your question !",lines=1).style(full_width=True)
@@ -140,7 +140,7 @@ with gr.Blocks(css=css) as demo:
140
  clean_chat_btn = gr.Button("Delete Chat")
141
 
142
  with gr.Column():
143
- with gr.Row():
144
  LLM_option = gr.Dropdown(['HuggingFace','OpenAI'],label='Large Language Model Selection',info='LLM Service')
145
  API_key = gr.Textbox(label="Add API key", type="password",autofocus=True)
146
  with gr.Accordion(label='Advanced options', open=False):
@@ -152,15 +152,15 @@ with gr.Blocks(css=css) as demo:
152
  value=DEFAULT_MAX_NEW_TOKENS,
153
  )
154
  temperature = gr.Slider(label='Temperature',minimum=0.1,maximum=4.0,step=0.1,value=DEFAULT_TEMPERATURE,)
155
-
156
- char_length = gr.Slider(
157
- label='Max Character',minimum= DEFAULT_CHAR_LENGTH,maximum = 5*DEFAULT_CHAR_LENGTH,
158
  step = 500,value= 1500
159
  )
160
 
161
  with gr.Column():
162
- youtube_link = gr.Textbox(label="Add your you tube Link",text_align='left',autofocus=True)
163
  with gr.Box():
 
164
  with gr.Row():
165
  load_youtube_bt = gr.Button("Process Youtube Link",).style(full_width = False)
166
  langchain_status = gr.Textbox(label="Status", placeholder="", interactive = False)
 
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.
 
132
  gr.HTML(title)
133
 
134
  with gr.Group():
135
+ chatbot = gr.Chatbot(height=100)
136
 
137
  with gr.Row():
138
  question = gr.Textbox(label="Type your question !",lines=1).style(full_width=True)
 
140
  clean_chat_btn = gr.Button("Delete Chat")
141
 
142
  with gr.Column():
143
+ with gr.Box():
144
  LLM_option = gr.Dropdown(['HuggingFace','OpenAI'],label='Large Language Model Selection',info='LLM Service')
145
  API_key = gr.Textbox(label="Add API key", type="password",autofocus=True)
146
  with gr.Accordion(label='Advanced options', open=False):
 
152
  value=DEFAULT_MAX_NEW_TOKENS,
153
  )
154
  temperature = gr.Slider(label='Temperature',minimum=0.1,maximum=4.0,step=0.1,value=DEFAULT_TEMPERATURE,)
155
+ char_length = gr.Slider(label='Max Character',
156
+ minimum= DEFAULT_CHAR_LENGTH,
157
+ maximum = 5*DEFAULT_CHAR_LENGTH,
158
  step = 500,value= 1500
159
  )
160
 
161
  with gr.Column():
 
162
  with gr.Box():
163
+ youtube_link = gr.Textbox(label="Add your you tube Link",text_align='left',autofocus=True)
164
  with gr.Row():
165
  load_youtube_bt = gr.Button("Process Youtube Link",).style(full_width = False)
166
  langchain_status = gr.Textbox(label="Status", placeholder="", interactive = False)