Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import re
|
2 |
-
#from dotenv import load_dotenv
|
3 |
import json
|
4 |
import gradio as gr
|
5 |
import random
|
@@ -9,15 +15,7 @@ import requests
|
|
9 |
from transformers import BertModel, BertTokenizerFast, AdamW
|
10 |
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
#load_dotenv(override=True)
|
15 |
-
#if not os.getenv("HF_API_KEY"):
|
16 |
-
# raise ValueError("HF_API_KEY must be set")
|
17 |
-
#hf_key = os.getenv('HF_API_KEY')
|
18 |
-
|
19 |
API_URL = "https://api-inference.huggingface.co/models/t4ai/distilbert-finetuned-t3-qa"
|
20 |
-
#headers = {"Authorization": "Bearer " + hf_key }
|
21 |
headers = {}
|
22 |
|
23 |
def query_model(payload):
|
|
|
1 |
+
##############################################################
|
2 |
+
#
|
3 |
+
# AAI-520 Final Project - Team 3
|
4 |
+
# University of San Diego, Shiley Marcos School of Engineering
|
5 |
+
# Copyright 2023 Tyler Foreman, Ahmed Ahmed, Tursun Alkman
|
6 |
+
#
|
7 |
+
##############################################################
|
8 |
import re
|
|
|
9 |
import json
|
10 |
import gradio as gr
|
11 |
import random
|
|
|
15 |
from transformers import BertModel, BertTokenizerFast, AdamW
|
16 |
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
API_URL = "https://api-inference.huggingface.co/models/t4ai/distilbert-finetuned-t3-qa"
|
|
|
19 |
headers = {}
|
20 |
|
21 |
def query_model(payload):
|