davanstrien HF staff commited on
Commit
a937268
1 Parent(s): 24f13dd

formatting

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -2,7 +2,6 @@ import gradio as gr
2
  from qdrant_client import QdrantClient
3
  from qdrant_client import models
4
  from sentence_transformers import SentenceTransformer
5
- from huggingface_hub import hf_hub_url
6
  from dotenv import load_dotenv
7
  import os
8
  from functools import lru_cache
@@ -64,7 +63,8 @@ def hub_id_qdrant_id(hub_id):
64
  return matches[0][0].id
65
  except IndexError as e:
66
  raise gr.Error(
67
- f"Hub id {hub_id} not in out database. This could be because it is very new or because it doesn't have much documentation."
 
68
  ) from e
69
 
70
 
@@ -86,11 +86,14 @@ with gr.Blocks() as demo:
86
  gr.Markdown("## 🤗 Semantic Dataset Search")
87
  with gr.Row():
88
  gr.Markdown(
89
- "This Gradio app allows you to search for datasets based on their descriptions. You can either search for similar datasets to a given dataset or search for datasets based on a query."
 
 
90
  )
91
  with gr.Row():
92
- search_term = gr.Textbox(value="movie review sentiment",
93
- label="hub id i.e. IMDB or query i.e. movie review sentiment"
 
94
  )
95
  with gr.Row():
96
  with gr.Row():
 
2
  from qdrant_client import QdrantClient
3
  from qdrant_client import models
4
  from sentence_transformers import SentenceTransformer
 
5
  from dotenv import load_dotenv
6
  import os
7
  from functools import lru_cache
 
63
  return matches[0][0].id
64
  except IndexError as e:
65
  raise gr.Error(
66
+ f"Hub id {hub_id} not in out database. This could be because it is very new"
67
+ " or because it doesn't have much documentation."
68
  ) from e
69
 
70
 
 
86
  gr.Markdown("## 🤗 Semantic Dataset Search")
87
  with gr.Row():
88
  gr.Markdown(
89
+ "This Gradio app allows you to search for datasets based on their"
90
+ " descriptions. You can either search for similar datasets to a given"
91
+ " dataset or search for datasets based on a query."
92
  )
93
  with gr.Row():
94
+ search_term = gr.Textbox(
95
+ value="movie review sentiment",
96
+ label="hub id i.e. IMDB or query i.e. movie review sentiment",
97
  )
98
  with gr.Row():
99
  with gr.Row():