Commit
·
d40d48f
1
Parent(s):
cc22a88
debugging
Browse files
app.py
CHANGED
@@ -140,24 +140,10 @@ with gr.Blocks(css=css) as demo:
|
|
140 |
chatbot = gr.Chatbot(height=250)
|
141 |
|
142 |
with gr.Row():
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
with gr.Accordion(label='Advanced options', open=False):
|
148 |
-
max_new_tokens = gr.Slider(
|
149 |
-
label='Max new tokens',
|
150 |
-
minimum=2048,
|
151 |
-
maximum=MAX_NEW_TOKENS,
|
152 |
-
step=1,
|
153 |
-
value=DEFAULT_MAX_NEW_TOKENS,
|
154 |
-
)
|
155 |
-
temperature = gr.Slider(label='Temperature',minimum=0.1,maximum=4.0,step=0.1,value=DEFAULT_TEMPERATURE,)
|
156 |
-
char_length = gr.Slider(label='Max Character',
|
157 |
-
minimum= DEFAULT_CHAR_LENGTH,
|
158 |
-
maximum = 5*DEFAULT_CHAR_LENGTH,
|
159 |
-
step = 500,value= 1500
|
160 |
-
)
|
161 |
|
162 |
with gr.Column():
|
163 |
with gr.Box():
|
@@ -165,6 +151,20 @@ with gr.Blocks(css=css) as demo:
|
|
165 |
with gr.Row():
|
166 |
load_youtube_bt = gr.Button("Process Youtube Link",).style(full_width = False)
|
167 |
langchain_status = gr.Textbox(label="Status", placeholder="", interactive = False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
|
169 |
|
170 |
load_youtube_bt.click(youtube_chat,inputs= [youtube_link,API_key,LLM_option,temperature,max_new_tokens,char_length],outputs=[langchain_status], queue=False)
|
|
|
140 |
chatbot = gr.Chatbot(height=250)
|
141 |
|
142 |
with gr.Row():
|
143 |
+
with gr.Box():
|
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.Column():
|
149 |
with gr.Box():
|
|
|
151 |
with gr.Row():
|
152 |
load_youtube_bt = gr.Button("Process Youtube Link",).style(full_width = False)
|
153 |
langchain_status = gr.Textbox(label="Status", placeholder="", interactive = False)
|
154 |
+
with gr.Accordion(label='Advanced options', open=False):
|
155 |
+
max_new_tokens = gr.Slider(
|
156 |
+
label='Max new tokens',
|
157 |
+
minimum=2048,
|
158 |
+
maximum=MAX_NEW_TOKENS,
|
159 |
+
step=1,
|
160 |
+
value=DEFAULT_MAX_NEW_TOKENS,
|
161 |
+
)
|
162 |
+
temperature = gr.Slider(label='Temperature',minimum=0.1,maximum=4.0,step=0.1,value=DEFAULT_TEMPERATURE,)
|
163 |
+
char_length = gr.Slider(label='Max Character',
|
164 |
+
minimum= DEFAULT_CHAR_LENGTH,
|
165 |
+
maximum = 5*DEFAULT_CHAR_LENGTH,
|
166 |
+
step = 500,value= 1500
|
167 |
+
)
|
168 |
|
169 |
|
170 |
load_youtube_bt.click(youtube_chat,inputs= [youtube_link,API_key,LLM_option,temperature,max_new_tokens,char_length],outputs=[langchain_status], queue=False)
|