Spaces:
Runtime error
Runtime error
Francesco-A
commited on
Commit
•
084c343
1
Parent(s):
665620b
debug
Browse files
app.py
CHANGED
@@ -77,7 +77,7 @@ contexts = [
|
|
77 |
# Function to find similar answers in a list of contexts
|
78 |
def QA_similarity(question, contexts, n_answers=1):
|
79 |
|
80 |
-
|
81 |
contexts = context_df['Context'].to_list()
|
82 |
|
83 |
# to use 'clips/mfaq' questions need to be prepended with <Q>, and answers with <A>.
|
@@ -113,8 +113,14 @@ def QA_similarity(question, contexts, n_answers=1):
|
|
113 |
return df
|
114 |
|
115 |
# %% ../drive/MyDrive/Codici/Python/Gradio_App/SemanticSearch_QA-v1.ipynb 7
|
116 |
-
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
|
119 |
n_slider = gr.components.Slider(minimum=1, maximum = 10, label = "Select n answers (max= 10)",step = 1)
|
120 |
|
|
|
77 |
# Function to find similar answers in a list of contexts
|
78 |
def QA_similarity(question, contexts, n_answers=1):
|
79 |
|
80 |
+
|
81 |
contexts = context_df['Context'].to_list()
|
82 |
|
83 |
# to use 'clips/mfaq' questions need to be prepended with <Q>, and answers with <A>.
|
|
|
113 |
return df
|
114 |
|
115 |
# %% ../drive/MyDrive/Codici/Python/Gradio_App/SemanticSearch_QA-v1.ipynb 7
|
116 |
+
|
117 |
+
data = {
|
118 |
+
'Context': contexts,
|
119 |
+
}
|
120 |
+
|
121 |
+
context_df = pd.DataFrame(data)
|
122 |
+
|
123 |
+
a_text = gr.components.Dataframe(context_df,col_count=(1,"fixed"))
|
124 |
|
125 |
n_slider = gr.components.Slider(minimum=1, maximum = 10, label = "Select n answers (max= 10)",step = 1)
|
126 |
|