Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,12 @@ from datasets import Value
|
|
| 9 |
from datasets import Dataset
|
| 10 |
import matplotlib.pyplot as plt
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
Secret_token = os.getenv('HF_Token')
|
| 15 |
|
|
@@ -78,7 +83,7 @@ def narrator_retriever(name):
|
|
| 78 |
return narrator_bios[(narrator_bios['Official Name'].apply(lambda x: araby.strip_diacritics(x)).str.contains(araby.strip_diacritics(name), regex=True)) | (narrator_bios['Famous Name'].apply(lambda x: araby.strip_diacritics(x)).str.contains(araby.strip_diacritics(name), regex=True)) | (narrator_bios['Rawi ID'].astype(str).isin(full_names.split('|')))]
|
| 79 |
|
| 80 |
|
| 81 |
-
with gr.Blocks() as demo:
|
| 82 |
gr.Markdown("Search Narrators using this tool or Retrieve Transmissions involving Narrator")
|
| 83 |
with gr.Tab("Search Narrator"):
|
| 84 |
text_input = gr.Textbox()
|
|
|
|
| 9 |
from datasets import Dataset
|
| 10 |
import matplotlib.pyplot as plt
|
| 11 |
|
| 12 |
+
css = """
|
| 13 |
+
.table-wrap {
|
| 14 |
+
min-height: 600px;
|
| 15 |
+
max-height: 600px;
|
| 16 |
+
}
|
| 17 |
+
"""
|
| 18 |
|
| 19 |
Secret_token = os.getenv('HF_Token')
|
| 20 |
|
|
|
|
| 83 |
return narrator_bios[(narrator_bios['Official Name'].apply(lambda x: araby.strip_diacritics(x)).str.contains(araby.strip_diacritics(name), regex=True)) | (narrator_bios['Famous Name'].apply(lambda x: araby.strip_diacritics(x)).str.contains(araby.strip_diacritics(name), regex=True)) | (narrator_bios['Rawi ID'].astype(str).isin(full_names.split('|')))]
|
| 84 |
|
| 85 |
|
| 86 |
+
with gr.Blocks(css=css) as demo:
|
| 87 |
gr.Markdown("Search Narrators using this tool or Retrieve Transmissions involving Narrator")
|
| 88 |
with gr.Tab("Search Narrator"):
|
| 89 |
text_input = gr.Textbox()
|