Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -685,24 +685,6 @@ def launch_interface(share=True):
|
|
| 685 |
query_optimization_model_input = gr.Textbox(label="Query Optimization Model", value="google/flan-t5-base")
|
| 686 |
use_reranking_input = gr.Checkbox(label="Use Reranking", value=False)
|
| 687 |
|
| 688 |
-
results_output = gr.Dataframe(label="Results", interactive=False)
|
| 689 |
-
stats_output = gr.Dataframe(label="Statistics", interactive=False)
|
| 690 |
-
plot_output = gr.Plot(label="Visualizations")
|
| 691 |
-
|
| 692 |
-
submit_button = gr.Button("Compare Embeddings")
|
| 693 |
-
submit_button.click(
|
| 694 |
-
fn=compare_embeddings,
|
| 695 |
-
inputs=[
|
| 696 |
-
file_input, query_input, embedding_models_input, custom_embedding_model_input,
|
| 697 |
-
split_strategy_input, chunk_size_input, overlap_size_input, custom_separators_input,
|
| 698 |
-
vector_store_type_input, search_type_input, top_k_input, lang_input,
|
| 699 |
-
apply_preprocessing_input, optimize_vocab_input, apply_phonetic_input,
|
| 700 |
-
phonetic_weight_input, custom_tokenizer_file_input, custom_tokenizer_model_input,
|
| 701 |
-
custom_tokenizer_vocab_size_input, custom_tokenizer_special_tokens_input,
|
| 702 |
-
use_query_optimization_input, query_optimization_model_input, use_reranking_input
|
| 703 |
-
],
|
| 704 |
-
outputs=[results_output, stats_output, plot_output]
|
| 705 |
-
)
|
| 706 |
####
|
| 707 |
with gr.Tab("Automated"):
|
| 708 |
auto_file_input = gr.File(label="Upload File (Optional)")
|
|
@@ -731,6 +713,25 @@ def launch_interface(share=True):
|
|
| 731 |
auto_use_query_optimization = gr.Checkbox(label="Test Query Optimization", value=True)
|
| 732 |
auto_use_reranking = gr.Checkbox(label="Test Reranking", value=True)
|
| 733 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 734 |
auto_results_output = gr.Dataframe(label="Automated Test Results", interactive=False)
|
| 735 |
auto_stats_output = gr.Dataframe(label="Automated Test Statistics", interactive=False)
|
| 736 |
recommendations_output = gr.JSON(label="Recommendations")
|
|
|
|
| 685 |
query_optimization_model_input = gr.Textbox(label="Query Optimization Model", value="google/flan-t5-base")
|
| 686 |
use_reranking_input = gr.Checkbox(label="Use Reranking", value=False)
|
| 687 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 688 |
####
|
| 689 |
with gr.Tab("Automated"):
|
| 690 |
auto_file_input = gr.File(label="Upload File (Optional)")
|
|
|
|
| 713 |
auto_use_query_optimization = gr.Checkbox(label="Test Query Optimization", value=True)
|
| 714 |
auto_use_reranking = gr.Checkbox(label="Test Reranking", value=True)
|
| 715 |
|
| 716 |
+
results_output = gr.Dataframe(label="Results", interactive=False)
|
| 717 |
+
stats_output = gr.Dataframe(label="Statistics", interactive=False)
|
| 718 |
+
plot_output = gr.Plot(label="Visualizations")
|
| 719 |
+
|
| 720 |
+
submit_button = gr.Button("Compare Embeddings")
|
| 721 |
+
submit_button.click(
|
| 722 |
+
fn=compare_embeddings,
|
| 723 |
+
inputs=[
|
| 724 |
+
file_input, query_input, embedding_models_input, custom_embedding_model_input,
|
| 725 |
+
split_strategy_input, chunk_size_input, overlap_size_input, custom_separators_input,
|
| 726 |
+
vector_store_type_input, search_type_input, top_k_input, lang_input,
|
| 727 |
+
apply_preprocessing_input, optimize_vocab_input, apply_phonetic_input,
|
| 728 |
+
phonetic_weight_input, custom_tokenizer_file_input, custom_tokenizer_model_input,
|
| 729 |
+
custom_tokenizer_vocab_size_input, custom_tokenizer_special_tokens_input,
|
| 730 |
+
use_query_optimization_input, query_optimization_model_input, use_reranking_input
|
| 731 |
+
],
|
| 732 |
+
outputs=[results_output, stats_output, plot_output]
|
| 733 |
+
)
|
| 734 |
+
|
| 735 |
auto_results_output = gr.Dataframe(label="Automated Test Results", interactive=False)
|
| 736 |
auto_stats_output = gr.Dataframe(label="Automated Test Statistics", interactive=False)
|
| 737 |
recommendations_output = gr.JSON(label="Recommendations")
|