Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -63,21 +63,21 @@ def extract_text_from_pdf(pdf_file):
|
|
| 63 |
"""
|
| 64 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 65 |
"""
|
| 66 |
-
demo = gr.ChatInterface(
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
)
|
| 81 |
|
| 82 |
pdf_interface = gr.Interface(
|
| 83 |
fn=extract_text_from_pdf,
|
|
@@ -88,10 +88,10 @@ pdf_interface = gr.Interface(
|
|
| 88 |
)
|
| 89 |
|
| 90 |
# Create the tabbed interface
|
| 91 |
-
demo = gr.TabbedInterface(
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
)
|
| 95 |
|
| 96 |
if __name__ == "__main__":
|
| 97 |
demo.launch()
|
|
|
|
| 63 |
"""
|
| 64 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 65 |
"""
|
| 66 |
+
# demo = gr.ChatInterface(
|
| 67 |
+
# respond,
|
| 68 |
+
# additional_inputs=[
|
| 69 |
+
# gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|
| 70 |
+
# gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
| 71 |
+
# gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
| 72 |
+
# gr.Slider(
|
| 73 |
+
# minimum=0.1,
|
| 74 |
+
# maximum=1.0,
|
| 75 |
+
# value=0.95,
|
| 76 |
+
# step=0.05,
|
| 77 |
+
# label="Top-p (nucleus sampling)",
|
| 78 |
+
# ),
|
| 79 |
+
# ],
|
| 80 |
+
# )
|
| 81 |
|
| 82 |
pdf_interface = gr.Interface(
|
| 83 |
fn=extract_text_from_pdf,
|
|
|
|
| 88 |
)
|
| 89 |
|
| 90 |
# Create the tabbed interface
|
| 91 |
+
# demo = gr.TabbedInterface(
|
| 92 |
+
# interface_list=[demo, pdf_interface],
|
| 93 |
+
# tab_names=["Chat", "PDF Extractor"]
|
| 94 |
+
# )
|
| 95 |
|
| 96 |
if __name__ == "__main__":
|
| 97 |
demo.launch()
|