Andrewstivan commited on
Commit
378a1ed
·
verified ·
1 Parent(s): 549766e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -1,5 +1,9 @@
1
  import gradio as gr
2
  from transformers import pipeline
 
 
 
 
3
 
4
  print("Loading model...")
5
  pipe = pipeline("text-generation", model="Andrewstivan/AURA", device=-1)
@@ -20,4 +24,6 @@ gr.ChatInterface(
20
  fn=chat,
21
  title="✨ Aura — поэтичная модель",
22
  description="Пишите по-русски, модель отвечает на русском"
23
- ).launch()
 
 
 
1
  import gradio as gr
2
  from transformers import pipeline
3
+ import os
4
+ os.environ["HF_HOME"] = "/data/.huggingface"
5
+ os.environ["HF_DATASETS_CACHE"] = "/data/.cache/huggingface/datasets"
6
+ os.environ["TRANSFORMERS_CACHE"] = "/data/.cache/huggingface/transformers"
7
 
8
  print("Loading model...")
9
  pipe = pipeline("text-generation", model="Andrewstivan/AURA", device=-1)
 
24
  fn=chat,
25
  title="✨ Aura — поэтичная модель",
26
  description="Пишите по-русски, модель отвечает на русском"
27
+ ).launch()
28
+ if __name__ == "__main__":
29
+ demo.launch(server_name="0.0.0.0", server_port=7860)