Spaces:
Runtime error
Runtime error
GirishKiran
commited on
Commit
·
2dcae10
1
Parent(s):
04c194f
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
@@ -1,19 +1,13 @@
|
|
1 |
|
2 |
import openai
|
3 |
import llama_index
|
4 |
-
import torch
|
5 |
import cryptography
|
6 |
import cryptography.fernet
|
7 |
-
import gradio
|
8 |
import huggingface_hub
|
9 |
import huggingface_hub.hf_api
|
10 |
import json
|
11 |
-
import time
|
12 |
import os
|
13 |
-
import
|
14 |
-
import sys
|
15 |
-
import psutil
|
16 |
-
import socket
|
17 |
class HFace_Pluto(object):
|
18 |
# initialize the object
|
19 |
def __init__(self, name="Pluto",*args, **kwargs):
|
@@ -81,7 +75,7 @@ class HFace_Pluto(object):
|
|
81 |
#
|
82 |
def push_hface_files(self,
|
83 |
hf_names,
|
84 |
-
hf_space="
|
85 |
local_dir="/content/"):
|
86 |
f = str(hf_names) + " is not iteratable, type: " + str(type(hf_names))
|
87 |
try:
|
@@ -188,7 +182,6 @@ def load_llama_index(self,vindex='vector_index',vpath='./index_storage'):
|
|
188 |
print('If do not have index tokens then run the .gen_llama_index() function')
|
189 |
print(f'Exception: {e}')
|
190 |
return
|
191 |
-
|
192 |
monty.load_llama_index()
|
193 |
|
194 |
@add_method(HFace_Pluto)
|
@@ -215,14 +208,11 @@ arti = '<li><i>**Note: You can add more documentation. The more documentation th
|
|
215 |
exp = [
|
216 |
['Tell me the Humana Gold Plus plan.'],
|
217 |
['Please write a summary in bullet point of the Humana Gold Plus SNP-DE H0028-015 (HMO-POS D-SNP) Annual Notice of Changes for 2023.'],
|
218 |
-
['Compare the Humana monthly premium and maximum out-of-pocket for in-network and out-network.'],
|
219 |
-
['What is the maximum dollar value allowance for in-network over the counter drug?'],
|
220 |
['Write a newsletter introducing Humana Gold Plus plan, and target it to senior citizen demographic.'],
|
221 |
['Please write a summary about the Humana and Longevity Health Partner so that a teenage can understand.'],
|
222 |
['Tell me about the state agency contact information in bullet point.'],
|
223 |
['Please tell me more about the Humana Offer Free Counseling about Medicare and Medicaid'],
|
224 |
['Write four engaging tweets about the Humana Gold Plus plan.'],
|
225 |
-
['Tell me something funny about Humana.'],
|
226 |
['Is Humana is same as human?']
|
227 |
]
|
228 |
flag_opt = [': Good', ': Bad']
|
@@ -234,4 +224,4 @@ gradio.Interface(fn=monty.ask_me,
|
|
234 |
examples=exp,
|
235 |
title=title,
|
236 |
description=desc,
|
237 |
-
article=arti).launch(debug=True)
|
|
|
1 |
|
2 |
import openai
|
3 |
import llama_index
|
|
|
4 |
import cryptography
|
5 |
import cryptography.fernet
|
|
|
6 |
import huggingface_hub
|
7 |
import huggingface_hub.hf_api
|
8 |
import json
|
|
|
9 |
import os
|
10 |
+
import gradio
|
|
|
|
|
|
|
11 |
class HFace_Pluto(object):
|
12 |
# initialize the object
|
13 |
def __init__(self, name="Pluto",*args, **kwargs):
|
|
|
75 |
#
|
76 |
def push_hface_files(self,
|
77 |
hf_names,
|
78 |
+
hf_space="girishlkiran/ct",
|
79 |
local_dir="/content/"):
|
80 |
f = str(hf_names) + " is not iteratable, type: " + str(type(hf_names))
|
81 |
try:
|
|
|
182 |
print('If do not have index tokens then run the .gen_llama_index() function')
|
183 |
print(f'Exception: {e}')
|
184 |
return
|
|
|
185 |
monty.load_llama_index()
|
186 |
|
187 |
@add_method(HFace_Pluto)
|
|
|
208 |
exp = [
|
209 |
['Tell me the Humana Gold Plus plan.'],
|
210 |
['Please write a summary in bullet point of the Humana Gold Plus SNP-DE H0028-015 (HMO-POS D-SNP) Annual Notice of Changes for 2023.'],
|
|
|
|
|
211 |
['Write a newsletter introducing Humana Gold Plus plan, and target it to senior citizen demographic.'],
|
212 |
['Please write a summary about the Humana and Longevity Health Partner so that a teenage can understand.'],
|
213 |
['Tell me about the state agency contact information in bullet point.'],
|
214 |
['Please tell me more about the Humana Offer Free Counseling about Medicare and Medicaid'],
|
215 |
['Write four engaging tweets about the Humana Gold Plus plan.'],
|
|
|
216 |
['Is Humana is same as human?']
|
217 |
]
|
218 |
flag_opt = [': Good', ': Bad']
|
|
|
224 |
examples=exp,
|
225 |
title=title,
|
226 |
description=desc,
|
227 |
+
article=arti).launch(debug=True)
|