Spaces:
Runtime error
Runtime error
Refactor app.py and update dependencies
Browse files- app.py +22 -6
- chatgpt_conversation_parser +1 -1
app.py
CHANGED
@@ -1,11 +1,27 @@
|
|
1 |
import gradio as gr
|
2 |
from chatgpt_conversation_parser.main import fetch_and_parse_conversation
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
)
|
9 |
|
|
|
10 |
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
from chatgpt_conversation_parser.main import fetch_and_parse_conversation
|
3 |
|
4 |
+
with gr.Blocks() as demo:
|
5 |
+
gr.Markdown(
|
6 |
+
"""
|
7 |
+
# ChatGPT Conversation Parser
|
|
|
8 |
|
9 |
+
This is a simple tool to fetch and parse a conversation from ChatGPT's web interface.
|
10 |
|
11 |
+
Enter the URL of the conversation to fetch and parse. The tool will return a JSONL file and the parsed conversation.
|
12 |
+
""".strip()
|
13 |
+
)
|
14 |
+
|
15 |
+
gr.Interface(
|
16 |
+
fn=fetch_and_parse_conversation,
|
17 |
+
inputs=["text"],
|
18 |
+
outputs=[gr.DownloadButton(label="Download JSONL"), gr.JSON()],
|
19 |
+
)
|
20 |
+
|
21 |
+
gr.Markdown(
|
22 |
+
"""
|
23 |
+
Made with ❤️ by [Berat Çimen](https://www.beratcimen.com/).
|
24 |
+
""".strip()
|
25 |
+
)
|
26 |
+
|
27 |
+
demo.launch()
|
chatgpt_conversation_parser
CHANGED
@@ -1 +1 @@
|
|
1 |
-
Subproject commit
|
|
|
1 |
+
Subproject commit 14c28efd537a8cfca12b11eef55d1fe62b02ca5a
|