Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,10 +26,10 @@ api=HfApi()
|
|
26 |
|
27 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
28 |
|
|
|
29 |
|
30 |
def sort_fn(inp):
|
31 |
|
32 |
-
client_sort = Client("Omnibus/sort_document")
|
33 |
sen,nouns = client_sort.predict(
|
34 |
f"{inp}", # str in 'Paste Text' Textbox component
|
35 |
api_name="/sort_doc"
|
@@ -39,8 +39,7 @@ def sort_fn(inp):
|
|
39 |
|
40 |
|
41 |
def find_fn(inp,sen,nouns):
|
42 |
-
|
43 |
-
result = client.predict(
|
44 |
inp, # str in 'Search query' Textbox component
|
45 |
sen, # Dict[Any, Any] (any valid json) in 'Sentences' Json component
|
46 |
nouns, # Dict[Any, Any] (any valid json) in 'Nouns' Json component
|
@@ -488,7 +487,7 @@ def search_fn(inp,history,report_check,chart_check,data):
|
|
488 |
inp = "Process this data"
|
489 |
history.clear()
|
490 |
history = [(inp,"Working on it...")]
|
491 |
-
yield "",history,error_box,
|
492 |
|
493 |
|
494 |
if data != "Error" and data != "":
|
|
|
26 |
|
27 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
28 |
|
29 |
+
client_sort = Client("Omnibus/sort_document")
|
30 |
|
31 |
def sort_fn(inp):
|
32 |
|
|
|
33 |
sen,nouns = client_sort.predict(
|
34 |
f"{inp}", # str in 'Paste Text' Textbox component
|
35 |
api_name="/sort_doc"
|
|
|
39 |
|
40 |
|
41 |
def find_fn(inp,sen,nouns):
|
42 |
+
result = client_sort.predict(
|
|
|
43 |
inp, # str in 'Search query' Textbox component
|
44 |
sen, # Dict[Any, Any] (any valid json) in 'Sentences' Json component
|
45 |
nouns, # Dict[Any, Any] (any valid json) in 'Nouns' Json component
|
|
|
487 |
inp = "Process this data"
|
488 |
history.clear()
|
489 |
history = [(inp,"Working on it...")]
|
490 |
+
yield "",history,error_box,None,None
|
491 |
|
492 |
|
493 |
if data != "Error" and data != "":
|