Commit
·
d9c78c0
1
Parent(s):
744a1c4
adding video examples as Radio and linking to fn
Browse files
app.py
CHANGED
@@ -108,8 +108,6 @@ def infer(question, history):
|
|
108 |
result = qa({"query": question})
|
109 |
matching_docs_score = vector_db.similarity_search_with_score(question)
|
110 |
|
111 |
-
print(" Matching_doc ",matching_docs_score)
|
112 |
-
|
113 |
return result["result"]
|
114 |
|
115 |
def bot(history):
|
@@ -148,6 +146,8 @@ with gr.Blocks(css=css) as demo:
|
|
148 |
with gr.Row():
|
149 |
LLM_option = gr.Dropdown(['HuggingFace','OpenAI'],label='Select HuggingFace/OpenAI')
|
150 |
API_key = gr.Textbox(label="Add API key", type="password",autofocus=True)
|
|
|
|
|
151 |
with gr.Accordion(label='Advanced options', open=False):
|
152 |
max_new_tokens = gr.Slider(
|
153 |
label='Max new tokens',
|
@@ -163,7 +163,6 @@ with gr.Blocks(css=css) as demo:
|
|
163 |
step = 500,value= 1500
|
164 |
)
|
165 |
|
166 |
-
|
167 |
with gr.Group():
|
168 |
chatbot = gr.Chatbot(height=220)
|
169 |
examples_set = gr.Radio(label="Examples of some You tube Videos",choices=EXAMPLES)
|
|
|
108 |
result = qa({"query": question})
|
109 |
matching_docs_score = vector_db.similarity_search_with_score(question)
|
110 |
|
|
|
|
|
111 |
return result["result"]
|
112 |
|
113 |
def bot(history):
|
|
|
146 |
with gr.Row():
|
147 |
LLM_option = gr.Dropdown(['HuggingFace','OpenAI'],label='Select HuggingFace/OpenAI')
|
148 |
API_key = gr.Textbox(label="Add API key", type="password",autofocus=True)
|
149 |
+
|
150 |
+
with gr.Column():
|
151 |
with gr.Accordion(label='Advanced options', open=False):
|
152 |
max_new_tokens = gr.Slider(
|
153 |
label='Max new tokens',
|
|
|
163 |
step = 500,value= 1500
|
164 |
)
|
165 |
|
|
|
166 |
with gr.Group():
|
167 |
chatbot = gr.Chatbot(height=220)
|
168 |
examples_set = gr.Radio(label="Examples of some You tube Videos",choices=EXAMPLES)
|