alexkueck commited on
Commit
4f34975
1 Parent(s): 2bf8606

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -10,6 +10,8 @@ from PIL import Image, ImageDraw, ImageOps, ImageFont
10
  import base64
11
  import tempfile
12
 
 
 
13
  from tavily import TavilyClient
14
 
15
  from langchain.chains import LLMChain, RetrievalQA
@@ -109,11 +111,19 @@ API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffus
109
  #Textgenerierung
110
  API_URL_TEXT = "https://api-inference.huggingface.co/models/argilla/notux-8x7b-v1"
111
 
 
112
  ################################################
113
  #HF Hub Zugriff ermöglichen
114
  ###############################################
115
  os.environ["HUGGINGFACEHUB_API_TOKEN"] = HUGGINGFACEHUB_API_TOKEN
116
 
 
 
 
 
 
 
 
117
 
118
  ################################################
119
  #OpenAI Zugang, client und Assistant einmal erzeugen.
 
10
  import base64
11
  import tempfile
12
 
13
+ from hugchat import hugchat
14
+ from hugchat.login import Login
15
  from tavily import TavilyClient
16
 
17
  from langchain.chains import LLMChain, RetrievalQA
 
111
  #Textgenerierung
112
  API_URL_TEXT = "https://api-inference.huggingface.co/models/argilla/notux-8x7b-v1"
113
 
114
+
115
  ################################################
116
  #HF Hub Zugriff ermöglichen
117
  ###############################################
118
  os.environ["HUGGINGFACEHUB_API_TOKEN"] = HUGGINGFACEHUB_API_TOKEN
119
 
120
+ ###############################################
121
+ #Alternativ: HuggingChat API nutzen
122
+ pw="Ba...."
123
+ email="ale...."
124
+ sign = Login(email, pw)
125
+ cookies = sign.login()
126
+
127
 
128
  ################################################
129
  #OpenAI Zugang, client und Assistant einmal erzeugen.