michaelthwan commited on
Commit
2f6f53f
·
1 Parent(s): ea3f6bb
README.md CHANGED
@@ -79,15 +79,3 @@ DigestEverything-GPT is licensed under the MIT License.
79
  # Acknowledgements
80
 
81
  - chatgpt_academic for gradio code framework
82
-
83
- ---
84
- title: Digest Everything Gpt
85
- emoji: 💻
86
- colorFrom: green
87
- colorTo: green
88
- sdk: gradio
89
- sdk_version: 3.24.1
90
- app_file: main.py
91
- pinned: true
92
- license: mit
93
- ---
 
79
  # Acknowledgements
80
 
81
  - chatgpt_academic for gradio code framework
 
 
 
 
 
 
 
 
 
 
 
 
digester/gradio_method_service.py CHANGED
@@ -7,7 +7,7 @@ from digester.chatgpt_service import LLMService, ChatGPTService
7
  from digester.util import Prompt, provide_text_with_css, GradioInputs
8
 
9
  WAITING_FOR_TARGET_INPUT = "Waiting for target source input"
10
- RESPONSE_SUFFIX = "⚡Powered by DigestEverythingGPT in github"
11
 
12
 
13
  class GradioMethodService:
@@ -65,8 +65,8 @@ class GradioMethodService:
65
  @staticmethod
66
  def ask_question(apikey_textbox, source_textbox, target_source_textbox, qa_textbox, gpt_model_textbox, language_textbox, chatbot, history):
67
  g_inputs = GradioInputs(apikey_textbox, source_textbox, target_source_textbox, qa_textbox, gpt_model_textbox, language_textbox, chatbot, history)
68
- msg = f"ask_question(`{qa_textbox}`)"
69
- g_inputs.chatbot.append(("test prompt query", msg))
70
  yield g_inputs.chatbot, g_inputs.history, 'Normal'
71
 
72
  @staticmethod
@@ -306,12 +306,12 @@ Instructions: (step by step instructions)
306
  video_type = yield from YoutubeChain.execute_classifer_chain(g_inputs, text_data)
307
  final_summary = yield from YoutubeChain.execute_final_summary_chain(g_inputs, text_data, video_type)
308
  full_summary = f"""
309
- {provide_text_with_css("DONE", "green")}
310
- Video: {text_data.title}
311
- # Timestamped summary
312
  {timestamped_summary}
313
 
314
- # Summary
315
  {final_summary}
316
 
317
  {RESPONSE_SUFFIX}
 
7
  from digester.util import Prompt, provide_text_with_css, GradioInputs
8
 
9
  WAITING_FOR_TARGET_INPUT = "Waiting for target source input"
10
+ RESPONSE_SUFFIX = "⚡Powered by github.com/michaelthwan/digest-everything-gpt"
11
 
12
 
13
  class GradioMethodService:
 
65
  @staticmethod
66
  def ask_question(apikey_textbox, source_textbox, target_source_textbox, qa_textbox, gpt_model_textbox, language_textbox, chatbot, history):
67
  g_inputs = GradioInputs(apikey_textbox, source_textbox, target_source_textbox, qa_textbox, gpt_model_textbox, language_textbox, chatbot, history)
68
+ prompt = f"ask_question(`{qa_textbox}`)"
69
+ g_inputs.chatbot.append((prompt, "Currently the ask feature is not supported yet"))
70
  yield g_inputs.chatbot, g_inputs.history, 'Normal'
71
 
72
  @staticmethod
 
306
  video_type = yield from YoutubeChain.execute_classifer_chain(g_inputs, text_data)
307
  final_summary = yield from YoutubeChain.execute_final_summary_chain(g_inputs, text_data, video_type)
308
  full_summary = f"""
309
+ {provide_text_with_css("DONE", "green")}
310
+ 🎞️Video: {text_data.title}
311
+ 📝Timestamped summary
312
  {timestamped_summary}
313
 
314
+ 📝Summary
315
  {final_summary}
316
 
317
  {RESPONSE_SUFFIX}
digester/gradio_ui_service.py CHANGED
@@ -3,7 +3,15 @@ import markdown
3
 
4
  from digester.gradio_method_service import GradioMethodService
5
 
6
- title_html = "<h1 align=\"center\">DigestEverythingGPT</h1>"
 
 
 
 
 
 
 
 
7
 
8
  cancel_handles = []
9
 
 
3
 
4
  from digester.gradio_method_service import GradioMethodService
5
 
6
+ title_html = """
7
+ <h1 align=\"center\">DigestEverythingGPT</h1>
8
+ <p align=\"center\">Version 20230613 (
9
+ <a href="https://github.com/michaelthwan/digest-everything-gpt"><i class="fa fa-github"></i> Github</a>
10
+ ) (
11
+ <a href="https://huggingface.co/spaces/michaelthwan/digest-everything-gpt"> HFSpace</a>
12
+ )<br>
13
+ Please give me a star in github if you like it 🌟! Your feedback will help us to improve</p>
14
+ """
15
 
16
  cancel_handles = []
17