ok
Browse files
app.py
CHANGED
@@ -75,7 +75,7 @@ def ask(question):
|
|
75 |
return answer
|
76 |
|
77 |
|
78 |
-
def summarize_pdf (
|
79 |
#print(input_pdf_question)
|
80 |
summary = ask(input_pdf_question)
|
81 |
return summary
|
@@ -94,9 +94,11 @@ gradio_app = gr.Interface(
|
|
94 |
description = "vous pouvez questionner un pdf.",
|
95 |
).launch(share=True, debug=True)
|
96 |
)
|
|
|
|
|
97 |
|
98 |
if __name__ == "__main__":
|
99 |
-
|
100 |
|
101 |
#https://www.machinelearningnuggets.com/gradio-tutorial/
|
102 |
|
|
|
75 |
return answer
|
76 |
|
77 |
|
78 |
+
def summarize_pdf (input_pdf_question, custom_prompt=""):
|
79 |
#print(input_pdf_question)
|
80 |
summary = ask(input_pdf_question)
|
81 |
return summary
|
|
|
94 |
description = "vous pouvez questionner un pdf.",
|
95 |
).launch(share=True, debug=True)
|
96 |
)
|
97 |
+
demo = gradio_app.TabbedInterface([gradio_app, gradio_app], ["Welcome", "What to do"])
|
98 |
+
|
99 |
|
100 |
if __name__ == "__main__":
|
101 |
+
demo.launch( auth=("username", "password"), auth_message="Try this",share=True)
|
102 |
|
103 |
#https://www.machinelearningnuggets.com/gradio-tutorial/
|
104 |
|