wikicredibility / app.py
combine the two models
eab8d68
raw
history blame
623 Bytes
import gradio as gr
from bs4 import BeautifulSoup
from bs4.element import Comment
import bibtexparser
from dateutil import parser
import json
import requests
import tldextract
from collections import defaultdict
import re
import mwparserfromhell
from transformers import pipeline
from source_eval_model import check_source_quality
from talk_page_analysis import tone_talkpage
def combined_function(wiki_url):
tones = tone_talkpage(wiki_url)
flags = check_source_quality(wiki_url)
return str(tones) + "\n" + str(flags)
iface = gr.Interface(fn=combined_function, inputs="text", outputs="text")
iface.launch()