Atulit23 commited on
Commit
ac20fb7
·
verified ·
1 Parent(s): 3c572a2

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -6,11 +6,11 @@ import gradio as gr
6
  def GetLlamaResponse(topic):
7
  llm = CTransformers(
8
  model_type="llama",
9
- model="/home/arnav-fedora/Blog_Generation/model/llama-2-7b-chat.ggmlv3.q8_0.bin",
10
  config={"max_new_tokens": 256, "temperature": 0.4},
11
  )
12
  template = """
13
- Generater a poem for hungry natural who wish to eat a delicious {topic} within 256 words
14
  """
15
  prompt = PromptTemplate(
16
  input_variables=["topic", "word_count", "poem_style", "temperature"],
@@ -65,18 +65,18 @@ def GetLlamaResponse(topic):
65
 
66
 
67
  inputs_image_url = [
68
- gr.Textbox(type="text", label="Image URL"),
69
  ]
70
 
71
  outputs_result_dict = [
72
- gr.Textbox(type="text", label="Result Dictionary"),
73
  ]
74
 
75
  interface_image_url = gr.Interface(
76
  fn=GetLlamaResponse,
77
  inputs=inputs_image_url,
78
  outputs=outputs_result_dict,
79
- title="Dark review detection",
80
  cache_examples=False,
81
  )
82
 
 
6
  def GetLlamaResponse(topic):
7
  llm = CTransformers(
8
  model_type="llama",
9
+ model="llama-2-7b-chat.ggmlv3.q8_0.bin",
10
  config={"max_new_tokens": 256, "temperature": 0.4},
11
  )
12
  template = """
13
+ Generate a poem for hungry natural who wish to eat a delicious {topic} within 256 words
14
  """
15
  prompt = PromptTemplate(
16
  input_variables=["topic", "word_count", "poem_style", "temperature"],
 
65
 
66
 
67
  inputs_image_url = [
68
+ gr.Textbox(type="text", label="Topic Name"),
69
  ]
70
 
71
  outputs_result_dict = [
72
+ gr.Textbox(type="text", label="Result"),
73
  ]
74
 
75
  interface_image_url = gr.Interface(
76
  fn=GetLlamaResponse,
77
  inputs=inputs_image_url,
78
  outputs=outputs_result_dict,
79
+ title="Poem Generation",
80
  cache_examples=False,
81
  )
82