Spaces:
Sleeping
Sleeping
just in case
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ def stream_reponse(msg: str, max_tokens=500) -> Iterator[str]:
|
|
45 |
|
46 |
|
47 |
def gen_datasets(search_query: str) -> Iterator[str]:
|
48 |
-
search_query = search_query if search_query.strip() else default_query
|
49 |
generated_text = ""
|
50 |
for token in stream_reponse(GENERATE_DATASET_NAMES_FOR_SEARCH_QUERY.format(search_query=search_query)):
|
51 |
generated_text += token
|
@@ -56,7 +56,7 @@ def gen_datasets(search_query: str) -> Iterator[str]:
|
|
56 |
|
57 |
|
58 |
def gen_dataset_content(search_query: str, dataset_name: str, tags: str) -> Iterator[str]:
|
59 |
-
search_query = search_query if search_query.strip() else default_query
|
60 |
generated_text = ""
|
61 |
for token in stream_reponse(GENERATE_DATASET_CONTENT_FOR_SEARCH_QUERY_AND_NAME_AND_TAGS.format(
|
62 |
search_query=search_query,
|
|
|
45 |
|
46 |
|
47 |
def gen_datasets(search_query: str) -> Iterator[str]:
|
48 |
+
search_query = search_query[:1000] if search_query.strip() else default_query
|
49 |
generated_text = ""
|
50 |
for token in stream_reponse(GENERATE_DATASET_NAMES_FOR_SEARCH_QUERY.format(search_query=search_query)):
|
51 |
generated_text += token
|
|
|
56 |
|
57 |
|
58 |
def gen_dataset_content(search_query: str, dataset_name: str, tags: str) -> Iterator[str]:
|
59 |
+
search_query = search_query[:1000] if search_query.strip() else default_query
|
60 |
generated_text = ""
|
61 |
for token in stream_reponse(GENERATE_DATASET_CONTENT_FOR_SEARCH_QUERY_AND_NAME_AND_TAGS.format(
|
62 |
search_query=search_query,
|