NouRed commited on
Commit
ca2100e
·
verified ·
1 Parent(s): e598b60

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -1,5 +1,6 @@
1
  # -*- coding: utf-8 -*- Nour Eddine Zekaoui et al.
2
 
 
3
  import torch
4
  import spaces
5
  import gradio as gr
@@ -11,6 +12,9 @@ from transformers import (
11
  AutoModelForCausalLM)
12
 
13
 
 
 
 
14
  def generate_prompt(instruction, input=None):
15
  if input:
16
  return f"""Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. # noqa: E501
 
1
  # -*- coding: utf-8 -*- Nour Eddine Zekaoui et al.
2
 
3
+ import os
4
  import torch
5
  import spaces
6
  import gradio as gr
 
12
  AutoModelForCausalLM)
13
 
14
 
15
+ # Set an environment variable
16
+ HF_TOKEN = os.environ.get("HF_TOKEN")
17
+
18
  def generate_prompt(instruction, input=None):
19
  if input:
20
  return f"""Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. # noqa: E501