mrolando commited on
Commit
d615894
1 Parent(s): 9db945b

probando otros modelos

Browse files
Files changed (3) hide show
  1. .gitignore +2 -0
  2. app.py +5 -2
  3. requirements.txt +2 -1
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ .env
2
+ env
app.py CHANGED
@@ -1,11 +1,14 @@
1
  from transformers import pipeline, Conversation
2
  import gradio as gr
3
  import base64
4
-
 
 
 
5
  with open("Iso_Logotipo_Ceibal.png", "rb") as image_file:
6
  encoded_image = base64.b64encode(image_file.read()).decode()
7
 
8
- bot = pipeline("conversational",model="meta-llama/Llama-2-7b-chat-hf")
9
  #"tiiuae/falcon-7b" este dio out of memory
10
  #"facebook/blenderbot-400M-distill" este es una conversaci贸n posta, aburrido
11
  # "meta-llama/Llama-2-7b-chat-hf" este es tonto
 
1
  from transformers import pipeline, Conversation
2
  import gradio as gr
3
  import base64
4
+ from dotenv import load_dotenv
5
+ import os
6
+ # Load environment variables from the .env file de forma local
7
+ load_dotenv()
8
  with open("Iso_Logotipo_Ceibal.png", "rb") as image_file:
9
  encoded_image = base64.b64encode(image_file.read()).decode()
10
 
11
+ bot = pipeline("conversational",model="meta-llama/Llama-2-7b-chat-hf",token =os.environ['TOKEN'])
12
  #"tiiuae/falcon-7b" este dio out of memory
13
  #"facebook/blenderbot-400M-distill" este es una conversaci贸n posta, aburrido
14
  # "meta-llama/Llama-2-7b-chat-hf" este es tonto
requirements.txt CHANGED
@@ -1,3 +1,4 @@
1
  transformers
2
  gradio
3
- torch
 
 
1
  transformers
2
  gradio
3
+ torch
4
+ python-dotenv