#from transformers import pipeline import time import os import openai import magic import requests import boto3 import json import pickle import gradio as gr from handler import openai_asr, langchain_idp, pdf_2_text # start_sequence = "\nAI:" # restart_sequence = "\nHuman: " # last_message = prompt prompt = "How can I help you today?" block = gr.Blocks() with block: gr.HTML( f"""

Dialogue Guided Intelligent Document Processing

Dialogue Guided Intelligent Document Processing (DGIDP) is an innovative approach to extracting and processing information from documents by leveraging natural language understanding and conversational AI. This technique allows users to interact with the IDP system using human-like conversations, asking questions, and receiving relevant information in real-time. The system is designed to understand context, process unstructured data, and respond to user queries effectively and efficiently.

While the text or voice chat accepts all major languages, the document upload feature only accepts files in English, German, French, Spanish, Italian, and Portuguese. The demo supports multilingual text and voice input, as well as multi-page documents in PDF, PNG, JPG, or TIFF format.

Buy Me A Coffee
""" ) model_choice = gr.Dropdown(choices=["dgidp", "gpt-3.5", "babyagi", "bloom", "j2-jumbo-instruct", "flan-t5-xl", "bedrock (coming soon)", "gpt4all (coming soon)", "gpt-4 (coming soon)"], label="Model selection", value="gpt-3.5") gr.HTML(f"""