- Python
- Javascript
- cURL
Step 1: /_index_upload
Accepts 1 parameter:
- 
file:filepath*Required The input value that is provided in the “Upload .txt or .csv File” File component. The FileData class is a subclass of the GradioModel class that represents a file object within a Gradio interface. It is used to store file data and metadata when a file is uploaded. Attributes: path: The server file path where the file is stored. url: The normalized server URL pointing to the file. size: The size of the file in bytes. orig_name: The original filename before upload. mime_type: The MIME type of the file. is_stream: Indicates whether the file is a stream. meta: Additional metadata used internally (should not be changed).
Returns tuple of 2 elements:
- 
dict(headers: list[Any], data: list[list[Any]], metadata: dict(str, list[Any] | None) | None)The output value that appears in the value_45Dataframe component.
- 
strThe output value that appears in the “Status” Textbox component. 
Step 2: /_search_wrapper
Accepts 2 parameters:
- 
query:string*RequiredThe input value that is provided in the Search QueryTextbox component.
- 
topn_:floatDefault 5The input value that is provided in the “Number of Results” Slider component. 
Returns 1 element
str | float | bool | list | dict
The output value that appears in the Search Results Json component.