File size: 1,370 Bytes
c9f26e8 4f5f090 ff4e3da c9f26e8 cb90219 4f5f090 c9f26e8 d33b30a c9f26e8 10b1c4c c9f26e8 d33b30a c9f26e8 ff4e3da c9f26e8 2591f90 c9f26e8 10b1c4c 2095477 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
import os
import argparse
import asyncio
import gradio as gr
from difflib import Differ
from string import Template
from utils import load_prompt, setup_gemini_client
from configs.responses import SummaryResponses
from google.genai import types
def main(args):
# style_css = open(args.css_path, "r").read()
# global client, prompt_tmpl, system_instruction
# client = None#setup_gemini_client(args)
# prompt_tmpl = load_prompt(args)
## Gradio Blocks
with gr.Blocks() as demo:
# State per session
state = gr.State({
"messages": [],
"attached_files": [],
"summary": "",
"summary_history": [],
"summary_diff_history": []
})
with gr.Column():
gr.Markdown("# Adaptive Summarization")
gr.Markdown("AdaptSum stands for Adaptive Summarization. This project focuses on developing an LLM-powered system for dynamic summarization. Instead of generating entirely new summaries with each update, the system intelligently identifies and modifies only the necessary parts of the existing summary. This approach aims to create a more efficient and fluid summarization process within a continuous chat interaction with an LLM.")
return demo
if __name__ == "__main__":
# args = parse_args()
demo = main(None)
demo.launch()
|