whoami02 commited on
Commit
2ea2830
·
1 Parent(s): d406aeb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -21
app.py CHANGED
@@ -57,27 +57,24 @@ def generate_text(prompt="Who is the CEO of Apple?"):
57
  # cleaned_output_text = output_text.replace(prompt, "")
58
  # return cleaned_output_text
59
 
60
- def main():
61
- os.getenv("hf_token")
62
- description = "Zephyr-beta"
63
 
64
- examples = [
65
- ["What is the capital of France?", "The capital of France is Paris."],
66
- [
67
- "Who wrote the novel 'Pride and Prejudice'?",
68
- "The novel 'Pride and Prejudice' was written by Jane Austen.",
69
- ],
70
- ["What is the square root of 64?", "The square root of 64 is 8."],
71
- ]
72
 
73
- gradio_interface = gr.Interface(
74
- fn=generate_text,
75
- inputs="text",
76
- outputs="text",
77
- examples=examples,
78
- title="Zephyr-B",
79
- )
80
- gradio_interface.launch()
81
 
82
- if __name__ == "__main__":
83
- main()
 
 
 
 
 
 
 
57
  # cleaned_output_text = output_text.replace(prompt, "")
58
  # return cleaned_output_text
59
 
 
 
 
60
 
61
+ os.getenv("hf_token")
62
+ description = "Zephyr-beta"
 
 
 
 
 
 
63
 
64
+ examples = [
65
+ ["What is the capital of France?", "The capital of France is Paris."],
66
+ [
67
+ "Who wrote the novel 'Pride and Prejudice'?",
68
+ "The novel 'Pride and Prejudice' was written by Jane Austen.",
69
+ ],
70
+ ["What is the square root of 64?", "The square root of 64 is 8."],
71
+ ]
72
 
73
+ gradio_interface = gr.Interface(
74
+ fn=generate_text,
75
+ inputs="text",
76
+ outputs="text",
77
+ examples=examples,
78
+ title="Zephyr-B",
79
+ )
80
+ gradio_interface.launch()