shresthasingh commited on
Commit
b34316b
1 Parent(s): 0667fd0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -60
app.py CHANGED
@@ -87,36 +87,6 @@ with gr.Blocks() as demo:
87
  with gr.Tab("Upload and Parse Files"):
88
  gr.Markdown("## Upload and Parse Files")
89
  gr.Markdown("Upload your documents here to create a searchable knowledge base.")
90
- gr.Markdown("""
91
- ### API Documentation
92
- 1. **Confirm that you have cURL installed on your system.**
93
-
94
- ```bash
95
- $ curl --version
96
- ```
97
- 2. **Find the API endpoint below corresponding to your desired function in the app.**
98
-
99
- **API Name: `/mariela_upload`**
100
-
101
- ```bash
102
- curl -X POST {url_of_gradio_app}/call/mariela_upload -s -H "Content-Type: application/json" -d '{
103
- "data": [
104
- [handle_file('https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf')],
105
- "Hello!!"
106
- ]}' \
107
- | awk -F'"' '{ print $4}' \
108
- | read EVENT_ID; curl -N {url_of_gradio_app}/call/mariela_upload/$EVENT_ID
109
- ```
110
-
111
- **Accepts 2 parameters:**
112
-
113
- - **[0] any (Required):** The input value that is provided in the "Upload Files" File component.
114
- - **[1] string (Required):** The input value that is provided in the "Collection Name" Textbox component.
115
-
116
- **Returns 1 element:**
117
-
118
- - **string:** The output value that appears in the "Status" Textbox component.
119
- """)
120
  file_input = gr.File(label="Upload Files", file_count="multiple")
121
  collection_name_input = gr.Textbox(label="Collection Name")
122
  upload_button = gr.Button("Upload and Parse")
@@ -127,36 +97,6 @@ with gr.Blocks() as demo:
127
  with gr.Tab("Retrieval"):
128
  gr.Markdown("## Retrieval")
129
  gr.Markdown("Ask questions about your uploaded documents here.")
130
- gr.Markdown("""
131
- ### API Documentation
132
- 1. **Confirm that you have cURL installed on your system.**
133
-
134
- ```bash
135
- $ curl --version
136
- ```
137
- 2. **Find the API endpoint below corresponding to your desired function in the app.**
138
-
139
- **API Name: `/mariela_retrieve`**
140
-
141
- ```bash
142
- curl -X POST {url_of_gradio_app}/call/mariela_retrieve -s -H "Content-Type: application/json" -d '{
143
- "data": [
144
- "Hello!!",
145
- "Hello!!"
146
- ]}' \
147
- | awk -F'"' '{ print $4}' \
148
- | read EVENT_ID; curl -N {url_of_gradio_app}/call/mariela_retrieve/$EVENT_ID
149
- ```
150
-
151
- **Accepts 2 parameters:**
152
-
153
- - **[0] string (Required):** The input value that is provided in the "Enter a query to retrieve relevant passages" Textbox component.
154
- - **[1] string (Required):** The input value that is provided in the "Collection Name" Textbox component.
155
-
156
- **Returns 1 element:**
157
-
158
- - **string:** The output value that appears in the "Retrieved Passages" Textbox component.
159
- """)
160
  collection_name_retrieval = gr.Textbox(label="Collection Name")
161
  question_input = gr.Textbox(label="Enter a query to retrieve relevant passages")
162
  retrieval_output = gr.Textbox(label="Retrieved Passages")
 
87
  with gr.Tab("Upload and Parse Files"):
88
  gr.Markdown("## Upload and Parse Files")
89
  gr.Markdown("Upload your documents here to create a searchable knowledge base.")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  file_input = gr.File(label="Upload Files", file_count="multiple")
91
  collection_name_input = gr.Textbox(label="Collection Name")
92
  upload_button = gr.Button("Upload and Parse")
 
97
  with gr.Tab("Retrieval"):
98
  gr.Markdown("## Retrieval")
99
  gr.Markdown("Ask questions about your uploaded documents here.")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  collection_name_retrieval = gr.Textbox(label="Collection Name")
101
  question_input = gr.Textbox(label="Enter a query to retrieve relevant passages")
102
  retrieval_output = gr.Textbox(label="Retrieved Passages")