Samarth991 commited on
Commit
9f0f7fe
1 Parent(s): d697d2c

Addind Chat functions to QA retrival chain

Browse files
Files changed (1) hide show
  1. app.py +19 -31
app.py CHANGED
@@ -126,38 +126,26 @@ title ="""<div
126
  with gr.Blocks(css=css) as demo:
127
  with gr.Column(elem_id="col-container"):
128
  gr.HTML(title)
129
- with gr.Accordion("Chat with Falcon-7B-Instruct", open=False):
130
- with gr.Column():
131
- gr.Markdown(
132
- """**Chat over you tube videos with [Falcon-7B-Instruct or ChatGPT]!**
133
- """)
134
-
135
- with gr.Column():
136
- with gr.Row():
137
- LLM_option = gr.Dropdown(['HuggingFace','OpenAI'],label='Large Language Model Selection',info='LLM Service')
138
- API_key = gr.Textbox(label="Add API key", type="password",autofocus=True)
139
- with gr.Accordion(label='Advanced options', open=False):
140
- max_new_tokens = gr.Slider(
141
- label='Max new tokens',
142
- minimum=2048,
143
- maximum=MAX_NEW_TOKENS,
144
- step=1,
145
- value=DEFAULT_MAX_NEW_TOKENS,
146
- )
147
- temperature = gr.Slider(
148
- label='Temperature',
149
- minimum=0.1,
150
- maximum=4.0,
151
- step=0.1,
152
- value=DEFAULT_TEMPERATURE,
153
- )
154
- char_length = gr.Slider(
155
- label='Max Character',
156
- minimum= DEFAULT_CHAR_LENGTH,
157
- maximum = 5*DEFAULT_CHAR_LENGTH,
158
- step = 500,
159
- value= 1500
160
  )
 
 
 
 
 
 
 
161
  with gr.Group():
162
  chatbot = gr.Chatbot(height=300)
163
 
 
126
  with gr.Blocks(css=css) as demo:
127
  with gr.Column(elem_id="col-container"):
128
  gr.HTML(title)
129
+
130
+ with gr.Column():
131
+ with gr.Row():
132
+ LLM_option = gr.Dropdown(['HuggingFace','OpenAI'],label='Large Language Model Selection',info='LLM Service')
133
+ API_key = gr.Textbox(label="Add API key", type="password",autofocus=True)
134
+ with gr.Accordion(label='Advanced options', open=False):
135
+ max_new_tokens = gr.Slider(
136
+ label='Max new tokens',
137
+ minimum=2048,
138
+ maximum=MAX_NEW_TOKENS,
139
+ step=1,
140
+ value=DEFAULT_MAX_NEW_TOKENS,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
  )
142
+ temperature = gr.Slider(label='Temperature',minimum=0.1,maximum=4.0,step=0.1,value=DEFAULT_TEMPERATURE,)
143
+
144
+ char_length = gr.Slider(
145
+ label='Max Character',minimum= DEFAULT_CHAR_LENGTH,maximum = 5*DEFAULT_CHAR_LENGTH,
146
+ step = 500,value= 1500
147
+ )
148
+
149
  with gr.Group():
150
  chatbot = gr.Chatbot(height=300)
151