This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if not os.path.exists('/content'): | |
os.mkdir('/content') | |
from google.colab import drive | |
drive.mount('content/gdrive') | |
!pip install transformers accelerate torch | |
!pip install git+https://github.com/huggingface/diffusers.git | |
############################################################# | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# All the code you need for a gradio app that can answers questions about kentucky law. | |
central_url = 'https://apps.legislature.ky.gov/law/statutes/' | |
import gradio as gr | |
import os | |
import json | |
from gpt_index import Document, SimpleDirectoryReader, GPTSimpleVectorIndex, MockLLMPredictor | |
import requests | |
from bs4 import BeautifulSoup | |
import pandas as pd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You need to install the following packages | |
# !pip3 install --upgrade revChatGPT | |
# !pip3 install selenium | |
# !pip3 install gtts | |
# !pip3 install gradio | |
# !pip3 install ipython | |
# !pip3 install numpy | |
# Really ought to learn how to properly architect python applications | |
# instead of putting everything in one file like this |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "WSoOPmCCVvwd", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%html | |
<style> | |
@import url("https://fonts.googleapis.com/css2?family=Arvo:wght@400;700&display=swap"); | |
* { | |
font-family: "Arvo"; | |
} | |
h3 { | |
margin-left:10%; | |
width: 80%; |