beratcmn commited on
Commit
60d7e20
·
1 Parent(s): 65581f0

Refactor app.py and update dependencies

Browse files
Files changed (2) hide show
  1. app.py +22 -6
  2. 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
- demo = gr.Interface(
5
- fn=fetch_and_parse_conversation,
6
- inputs=["text"],
7
- outputs=["text", gr.DownloadButton(label="Download JSONL")],
8
- )
9
 
 
10
 
11
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 aac86ae2b205d047db3fae26b38b1679b94fca93
 
1
+ Subproject commit 14c28efd537a8cfca12b11eef55d1fe62b02ca5a