devai-demo / conv_app.py
aakash0017's picture
Upload folder using huggingface_hub
7627550
raw
history blame
844 Bytes
import gradio as gr
from conversation import make_conversation
import random
import time
global USERNAME
global PASSWORD
global INPUT
global OUTPUT
global SOURCE
global DOCS
# def auth_function(username, password):
# USERNAME = username
# user_name = username
# return username == password
# def make_conversation(message, history):
# INPUT = message
# text_, source, docs = run(message)
# OUTPUT = text_
# SOURCE = source
# DOCS = docs
# # print("INPUT: ", INPUT)
# # print("OUTPUT: ", OUTPUT)
# # print("SOURCE: ", SOURCE)
# # print("DOCS: ", DOCS)
# for i in range(len(text_)):
# time.sleep(0.001)
# yield text_[: i+1]
with gr.Blocks(css="style.css") as demo:
gr.Markdown("""
# Dr. V AI
""")
gr.ChatInterface(make_conversation).queue()
demo.launch()